alias
To define an alias to be used at the ROM monitor prompt, use the alias command in ROM monitor mode.
alias [name=value]
Syntax Description
[name=value] |
(Optional) Specifies the name of the alias to be defined and its corresponding command string. If the value parameter includes spaces, you must include the string within double quotes. |
Command Default
If no arguments are given, displays the aliases that are currently defined.
Command Modes
ROM monitor (>)
Command History
Release |
Modification |
---|---|
11.3 NA |
This command was introduced on Cisco uBR7200 series routers. |
12.1(5)EC |
Support was added for Cisco uBR7100 series routers. |
12.2(4)BC1 |
Support was added for the Cisco uBR10012 router. Changes were also made to the boot procedure after breaking into ROMMON to ensure that all hardware and software registers are in a known state before loading the new image. |
12.3BC |
This command was integrated into Cisco IOS Release 12.3BC. |
12.2(33)SCA |
This command was integrated into Cisco IOS Release 12.2(33)SCA. Support for the Cisco uBR7225VXR router was added. |
Usage Guidelines
Aliasing allows you to abbreviate commands or to set up a command so that it is automatically run with certain options. The ROM monitor’s [name=value] alias function is based on the syntax used in the Korn shell on Unix systems.
Normally, only the first word at the ROM monitor prompt is checked for an alias. However, when you define an alias that contains a space as its last character, the ROM monitor also checks the next word at the ROM monitor prompt for an alias.
![]() Note |
If an alias contains any spaces, the entire command must be enclosed within quotes when you define it with the alias command. To create an alias for multiple commands, separate the commands with a semicolon (;) delimiter. |
![]() Tip |
Use the unalias command to delete an alias. |
Examples
The following example shows how to display the currently defined aliases:
rommon 13 > alias
r=repeat
h=history
?=help
b=boot
ls=dir
i=reset
k=stack
rommon 14 >
The following example defines an alias named “cpuinfo” that executes three separate CPU-related commands:
rommon 31 > alias cpuinfo="cpu_card_type;meminfo;context"
rommon 32 >
The following example shows how to define an alias dird that lists the file contents of the Flash Disk in the disk0 slot:
rommon 18 > alias dird="dir disk0:"
rommon 19 > alias
r=repeat
h=history
?=help
b=boot
ls=dir
i=reset
k=stack
dird=dir disk0:
rommon 20 >