Cisco IOS Command Aliases to Make Your Life Easier
How many times do you type show ip interface brief, copy run start, configure terminal, show running-config, etc. But isn’t there a way to make thing easier? Yes there is, that’s command aliases feature provided in Cisco IOS.
Aliases are configured within a mode; exec: #, 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 aliases.
A filtered output of the show aliases ? command is shown bellow.
1 2 3 4 5 6 7 8 9 10 | Router#show aliases ? --- output omitted --- configure Global configuration mode ... exec Exec mode ... interface Interface configuration mode ... router Router configuration mode ... |
The show aliases command in exec mode shows all the aliases configured on the router. By default there are some aliases in a router. you can view what they are by issuing show aliases command at the exec mode.
Syntax for setting an alias is: alias <mode> <alias> <command>. Lets look at an example. Here I’m setting the alias ib in exec mode for the command show ip interface brief.
1 | Router(config)#alias exec ib show ip interface brief |
In the following example, I configured the alias rt to show the IPv4 routing table in exec, global configuration, router configuration and interface configuration modes.
1 2 3 4 | Router(config)#alias exec rt show ip route Router(config)#alias configure rt do show ip route Router(config)#alias interface rt do show ip route Router(config)#alias router rt do show ip route |
The first line is quite straight forward. In the preceding lines I have used ‘do’ command to execute the command follows that in the exec mode. You can be creative with this command and it’s up to you to create your own aliases for your convenience.
Dharshin


















