Cisco Nexus 5000 Series Switch CLI Software Configuration Guide, NX-OS 4.0(1a)N1 (OL-16597-01, January 2009)

Send feedback to nx5000-docfeedback@cisco.com
2-10
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
OL-16597-01
Chapter 2 Using the Command-Line Interface
Using Command Aliases
0 CRC, 0 unknown class
0 too long, 0 too short
232691 frames output, 7448692 bytes
0 discards, 0 errors
0 input OLS, 0 LRR, 0 NOS, 0 loop inits
1 output OLS, 1 LRR, 0 NOS, 1 loop inits
16 receive B2B credit remaining
7 transmit B2B credit remaining
Use the show cli variables command to display user-defined CLI session variables. The following
example displays user-defined CLI session variables:
switch# show cli variables
VSH Variable List
-----------------
TIMESTAMP="2005-10-24-21.29.33"
testinterface="fc 1/1"
Use the cli no var name command to remove user-defined CLI session variables. The following example
removes a user-defined CLI session variable:
switch# cli no var name testinterface
Using Command Aliases
Command alias support has the following characteristics:
Command aliases are global for all user sessions.
Command aliases are saved across reboots.
Commands being aliased must be typed in full without abbreviation.
Command alias translation always takes precedence over any keyword in any configuration mode or
submode.
Command alias support is only available on the supervisor module, not the switching modules.
Command alias configuration takes effect for other user sessions immediately.
You cannot override the default command alias alias, which aliases the show cli alias command.
Nesting of command aliases is permitted to a maximum depth of 1. One command alias can refer to
another command alias that must refer to a valid command, not to another command alias.
A command alias always replaces the first command keyword on the command line.
You can define command aliases for commands in any configuration submode or the EXEC mode.
Defining Command Aliases
You can define command aliases using the cli alias name command in configuration mode.
This following example shows how to define command aliases:
switch# configure terminal
switch(config)# cli alias name eth interface ethernet
switch(config)# cli alias name shintbr show interface brief
switch(config)# cli alias name shfcintup shintbr | include up | include fc
You can display the command aliases defined on the switch using the alias default command alias.