How to create shortcut command
Cisco IOS permits to define a shortcut to complex command. An alias 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.
To create a command alias, issue the alias command in global configuration mode. The syntax of the command is alias mode command-alias original-command. Who have never typed repeatedly the commands show cdp neigh or show ip inter brief?
Some helpful alias could be:
- scn -> show cdp neighbor
- command: alias exec scn show cdp neighbor
- ifconfig -> show ip interface brief
- command: alias exec ifconfig show ip interface brief
- sint [interface number] ->show run interface fastEthernet
- command: alias exec sint show run interface fastethernet
- proc -> show proc cpu | excl 0.00%__0.00%__0.00%
- command: alias exec proc show proc cpu | excl 0.00%__0.00%__0.00
- eth0 -> interface fastethernet0/0
- command: alias configure eth0 interface fastethernet0/0
- ns -> no shutdown
- command: 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 you below:
alias configure sir do show ip route alias interface sir do show ip route
Remember: There are some built-in command aliases:
Ciscozine#sh aliases Exec mode aliases: h help lo logout p ping r resume s show u undebug un undebug w where Ciscozine#
- Crazy! Hacker Implants NFC Chip In His Hand To Hack Android Phones: There is a very sleek line betwee... http://t.co/BojsWXwIQI #hackers
- WordPress Zero-Day Exploit Disclosed, Millions of Sites At Risk: Most of the time, we have reported a... http://t.co/FplMCh1t0L #hackers
- Unicast flooding due to asymmetric routing - #junos #SWITCH #CISCO #JUNIPER #CCNA #CCNP #CCIE http://t.co/NI4hOPOx3c http://t.co/pWGWZ2nC51
Enter your email address to receive notifications of new posts.