Configuration Guide Command Line Interface Configuration
You can use one word to replace one command by configuring an alias for the command. For
example, you can define an alias to represent the front part of one command, and then
continue to enter the following part.
The command that an alias represents must run under the mode you have defined in the
current system. In the global configuration mode, you can enter alias? to list all command
modes that can configure alias.
Ruijie(config)#alias ?
aaa-gs AAA server group mode
acl acl configure mode
bgp Configure bgp Protocol
config globle configure mode
......
An alias supports help information. An alias appears with an asterisk (*) before it in the
following format:
*command-alias=original-command
For example, in the EXEC mode, the alias “s” indicates the show command by default. Enter
“s?” to obtain the help information on the command and the aliases beginning with „s‟.
Ruijie#s?
*s=show show start-chat start-terminal-service
If the command that an alias represents has more than one word, the command will be
included by the quotation marks. As shown in the following example, configure the alias “sv” to
replace the show version command in the EXEC mode.
Ruijie#s?
*s=show *sv=”show version” show start-chat
start-terminal-service
An alias must begin with the first character of the command line entered without any blank
before it. As shown in the above example, the alias is invalid if you have inputted a blank before
the command.
Ruijie# s?
show start-chat start-terminal-service
An alias can also be used to get the help information on obtaining command parameters. For
example, the alias “ia" represents “ip address” in the interface configuration mode.
Ruijie(config-if)#ia ?
A.B.C.D IP address