
27-6
Catalyst 4500 Series, Catalyst 2948G, Catalyst 2948G-GE-TX, and Catalyst 2980G Switches Software Configuration Guide—Release 8.2GLX
78-15908-01
Chapter 27 Administering the Switch
Defining and Using Command Aliases
This example shows how to display the Cisco Systems Console Telnet login banner content:
Console> (enable) show banner
MOTD banner:
Welcome to the Catalyst 4012 Switch!
Unauthorized access prohibited.
Contact [email protected] for access.
LCD config:
Telnet Banner:
disabled
Console> (enable)
Defining and Using Command Aliases
You can use the set alias command to define up to 100 command aliases (short versions of command
names) for frequently used or long and complex commands. Using command aliases can save you time
and help prevent typing errors when you are configuring or monitoring the switch.
For the name argument, specify a name for the command alias. The parameter argument is the text that
the user types at the command line to activate the command.
To define a command alias on the switch, perform this task in privileged mode:
This example shows how to define two command aliases:
•
sm3, which executes the show module 3/1 command
•
sp3, which executes the show port 3 command.
Console> (enable) set alias sm3 show module 3
Command alias added.
Console> (enable) set alias sp3 show port 3/1
Command alias added.
Console> (enable)
This example shows how to verify the currently defined command aliases:
Console> (enable) show alias
sm8 show module 3
sp8 show port 3
These examples show what happens when you enter the command aliases at the command line:
Console> (enable) sm3
Mod Slot Ports Module-Type Model Sub Status
--- ---- ----- ------------------------- ------------------- --- --------
3 3 6 1000BaseX Ethernet WS-X4306 no ok
Mod Module-Name Serial-Num
--- ------------------- --------------------
3 JAB024000YY
Mod MAC-Address(es) Hw Fw Sw
Task
Command
Step 1
Define a command alias on the switch.
set alias name command [parameter] [parameter]
Step 2
Verify the currently defined command aliases.
show alias [name]