alias

Configures global or user-level aliases for device commands.

Syntax

alias alias-name expansion
no alias alias-name

Parameters

alias-name
Specifies the alias name. The number of characters can be from 1 through 255.
expansion
Specifies the CLI command to be triggered when the alias is entered. If the command is more than one word, type double quotes (") around the command. The number of characters can be from 1 through 1023.

Modes

Alias configuration mode

User-alias configuration mode

Usage Guidelines

Global aliases are available to all users.

User-level aliases are available only for a specified user.

In the alias configuration mode, to delete a global alias use the no form of his command.

In the user-alias configuration mode, to delete a user alias use the no form of his command.

Examples

The following example defines ck as a global alias that enters the show clock command.

device# configure terminal
device(config)# alias-config
device(config-alias-config)# alias ck "show clock"

For the user jdoe, the following example defines sv as a user-level alias that enters the show version command.

device# configure terminal
device(config)# alias-config
device(config-alias-config)# user jdoe
device(config-user-jdoe)# alias sv "show version"