Cisco Nexus 5000 Series Switch CLI Software Configuration Guide (OL-16597-01, July 2009)

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.
The following example shows how to display the command aliases defined on the switch:
switch# alias
CLI alias commands
==================
alias :show cli alias
gigint :interface gigabitethernet
shintbr :show interface brief
shfcintup :shintbr | include up | include fc
Command Scripts
Executing Commands Specified in a Script
The run-script command executes the commands specified in a file. To use this command, be sure to create
the file and specify commands in the required order.
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
26 OL-16597-01
Using Command Aliases
Executing Commands Specified in a Script