Defining And Using Command Aliases - Cisco WS-C2948G-GE-TX Configuration Manual

Catalyst 4500 series switch
Table of Contents

Advertisement

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 sysadmin@corp.com 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:
Task
Step 1
Define a command alias on the switch.
Step 2
Verify the currently defined command aliases.
This example shows how to define two command aliases:
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
sp8
These examples show what happens when you enter the command aliases at the command line:
Console> (enable) sm3
Mod Slot Ports Module-Type
--- ---- ----- ------------------------- ------------------- --- --------
3
Mod Module-Name
--- ------------------- --------------------
3
Mod MAC-Address(es)
Catalyst 4500 Series, Catalyst 2948G, Catalyst 2948G-GE-TX, and Catalyst 2980G Switches Software Configuration Guide—Release 8.2GLX
27-6
sm3, which executes the show module 3/1 command
sp3, which executes the show port 3 command.
show module 3
show port 3
3
6
1000BaseX Ethernet
Serial-Num
JAB024000YY
Chapter 27
Command
set alias name command [parameter] [parameter]
show alias [name]
Model
Sub Status
WS-X4306
no
Hw
Fw
Sw
Administering the Switch
ok
78-15908-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents