Reference Guide

You cannot use the exiting CLI keywords as alias names. The alias name is case-sensitive and can have a maximum of 16 characters.
Create an alias in the CONFIGURATION mode. The switch enters the ALIAS mode.
alias alias-name
Enter the commands to be executed prexed by the line n command in the ALIAS mode. Enter the commands in double quotes and
use $n to enter input parameters. You can substitute $n with either numbers ranging from 1 to 9 or with an asterisk (*) and enter the
parameters while executing the commands using the alias. When you are using asterisk (*), you can use all the input parameters. The
maximum number of input parameters is 9.
line nn command
(Optional) You can enter the default values to be used for the parameters dened as $n in the ALIAS mode.
default n input-value
(Optional) Enter a description for the multi-line alias the ALIAS mode.
description string
Use the no form of the command to delete an alias in the CONFIGURATION mode.
no alias alias-name
You can modify the existing multi-line alias by entering the corresponding ALIAS mode.
Create multi-line alias
OS10(config)# alias mTest
OS10(config-alias-mTest)# line 1 "interface $1 $2"
OS10(config-alias-mTest)# line 2 "no shutdown"
OS10(config-alias-mTest)# line 3 "show configuration"
OS10(config-alias-mTest)# default 1 "ethernet"
OS10(config-alias-mTest)# default 2 "1/1/1"
OS10(config-alias-mTest)# description InterfaceDetails
View alias output for mTest with default values
OS10(config)# mTest
OS10(config)# interface ethernet 1/1/1
OS10(conf-if-eth1/1/1)# no shutdown
OS10(conf-if-eth1/1/1)# show configuration
!
interface ethernet1/1/1
no shutdown
switchport access vlan 1
View alias output for mTest with dierent values
OS10(config)# mTest ethernet 1/1/10
OS10(config)# interface ethernet 1/1/10
OS10(conf-if-eth1/1/10)# no shutdown
OS10(conf-if-eth1/1/10)# show configuration
!
interface ethernet1/1/10
no shutdown
switchport access vlan 1
Modify existing multi-line alias
OS10(config)# alias mTest
OS10(config-alias-mTest)# line 4 "exit"
View the commands saved in the multi-line alias
OS10(config-alias-mTest)# show configuration
!
alias mTest
description InterfaceDetails
default 1 ethernet
default 2 1/1/1
line 1 "interface $1 $2"
Getting Started
41