Creating an Alias for a CLI Command

An alias serves as a shorthand version of a longer CLI command.

To set up an alias for a CLI command, use the alias command, followed by the text of the alias, an equal sign (=) and the actual CLI command in full. Ensure you have spaces between all the elements.

To remove an alias from the configuration, use the no form of the command, or the unalias command. The specified alias name to be removed must be the name of an alias already configured on the RUCKUS device.

Note: The alias name must be a single word, without spaces.

Alias Examples

The following example creates an alias called shoro for the show ip route command. After the alias is configured, entering shoro in the privileged EXEC mode or in the global configuration mode runs the show ip route command.

device(config)# alias shoro = show ip route

The following example creates an alias called wrsbc for the copy running-config command. Using an alias can also save you from entering the appropriate parameters accompanying the command.

device(config)# alias wrsbc = copy running-config tftp 10.10.10.10 test.cfg

To display the aliases currently configured on the RUCKUS device, enter the alias command with no parameters.

device# alias
          wrsbc      copy running-config tftp 10.10.10.10 test.cfg
          shoro       show ip route

Examples of no alias or unalias Commands

The following example removes the wrsbc alias from the configuration.

device(config)# no alias wrsbc

The following example is an alternate way to remove the wrsbc alias from the configuration.

device(config)# unalias wrsbc