9
2009
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#
References: http://www.cisco.com/…/usingios.html#wp1013134
Related Posts
- Telefonica and Cisco Complete 4,000 kilometer 100Gbps IPoDWDM Trial http://t.co/7c0uqzH6bG
- Mozilla Releases Multiple Updates http://t.co/Kqldpe1MZ7
- Cisco Reports Third Quarter Earnings http://t.co/bE5q0Lu9uB
Email Updates
Archives
- May 2013
- April 2013
- March 2013
- February 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008


Pingback: Using regular expressions with the ‘Show’ command | CiscoZine