How to Configure Cisco Alias Commands on Cisco Router

In general we use commands like show ip interface brief, copy run start, configure terminal, show running-config, etc repeatedly. To save time and the repetition of entering the same command for multiple times, you can use a “alias Command“. Cisco IOS permits you to configure a shortcut command to complex command. An alias command can be configured to do anything that can be done at the command line, but an alias cannot move between modes, type in passwords, or perform any interactive functions.

Below Table contains default Command Aliases for Cisco Original Commands.

Default Cisco Alias Commands:

h help
lo Logout
p ping
s show
U or un undebug
w where

Find/show Default alias Commands on Cisco Router

Find default alias commands on Cisco Router with show aliases command.

Cisco-Router#sh aliases
Exec mode aliases:
h                     help
lo                    logout
p                     ping
r                     resume
s                     show
u                     undebug
un                    undebug
w                     where

Configure some Cisco alias commands and examples

Alias Commands are configured within a modes exec:, Privilege #, global configuration: (config)#, interface configuration: (config-if)#, router configuration: (config-router)#, etc. you can issue a show aliases ? command to see how many modes are there. But practically you’ll mostly need exec mode alias commands.

Cisco-Router#sh alias ?
Buffer                            config-owner-buffer
RITE-profile                      Router IP traffic export profile command mode
RMI-Node-Config                   Resource Policy Node Config mode
RMI-Resource-Group                Resource Group Config mode
RMI-Resource-Manager              Resource Manager Config mode
RMI-Resource-Policy               Resource Policy Config mode
SASL-profile                      SASL profile configuration mode
aaa-attr-list                     AAA attribute list config mode
aaa-user                          AAA user definition
accept-dialin                     VPDN group accept dialin configuration mode
accept-dialout                    VPDN group accept dialout configuration mode
acct_mlist                        AAA accounting methodlist definitions
address-family                    Address Family configuration mode
aic                               Alarm Interface Card configuration mode
appfw-application-aim             Appfw for AIM Configuration Mode
appfw-application-msnmsgr         Appfw for MSN Messenger Configuration Mode
appfw-application-ymsgr           Appfw for Yahoo! Messenger Configuration Mode
appfw-policy                      Application FW Policy Configuration Mode
application-http                  Appfw for HTTP Configuration Mode
archive                           Archive the router configuration mode
..........     output removed
config                            Global Configuration mode
..........     output removed
exec                              Exec mode
..........     output  removed

To create a command alias execute the alias command in global configuration mode of the Cisco Device. The syntax of the command is alias mode <command-alias> <original-command>.

Cisco-Router(config)# alias exec prt partition—privileged EXEC mode
Cisco-Router(config)# alias configure sb source-bridge—global configuration mode
Cisco-Router(config)# alias interface rl rate-limit—interface configuration mode
Cisco-Router(config)# alias exec scn show cdp neighbor – Privileged Exec Mode
Cisco-Router(config)# alias interface ns no shutdown

Tips: if you would create an alias for ’interface mode’ and ’priviledge mode’, you must define the same alias for the two environment. See as below:

Cisco-Router(config)# alias configure sir do show ip route
Cisco-Router(config)# alias interface sir do show ip route

To view both default and user-created aliases, execute the show alias command.

For more information about the alias command, see

Filed Under: Cisco General


About the Author:

RSSComments (2)

Leave a Reply | Trackback URL

  1. Clark says:

    Alias commands configuration in Cisco is nice and easy to remember with customized, shortcut commands.

  2. Hill says:

    Nice post! thanks for sharing.

Leave a Reply

If you want a picture to show with your comment, go get a Gravatar.