no alias <ALIAS-NAME>


Defines an alias for one or more CLI commands. The alias and its definition are valid only for the user that creates the alias.

The no form of this command removes the specified alias.

Command context




Specifies the name of the alias you are defining.


Specifies one or more commands and their parameters. Separate commands with a semicolon (;). Length: 1 to 400 characters.

For commands that require user-supplied parameters, use $1 through $n, in order, as placeholders. These parameters are replaced by the corresponding arguments from the command line, and must match the number of parameters required by the original command. For alias definitions that include multiple commands, continue numbering parameters through all commands. Do not restart numbering for each command.


Administrators or local user group members with execution rights for this command.


Creating the alias hst for the hostname command. The hostname command has a single argument, therefore $1 is required to support it.

switch(config)# alias hst hostname $1

Using the show alias command to show all the aliases that are defined on the switch.

switch(config)# do show alias
 Alias Name      Alias Definition
 hst             hostname $1

Using the new hat alias command:

switch(config)# hst myhost

Example alias defined by multiple commands

Configuring the alias intf_config for the commands interface, no shutdown, ip address, and lldp receive with supported parameters:

alias intf_config interface $1; no shutdown; ip address $2; lldp receive; mtu $3; exit

Executing the intf_config alias command:

switch(config)# intf_config 1/1/1 1200