Understanding the Command-Line Interface
Configuring Command Aliases for a User Session
You can create a command alias for the current user session that is not available to any other user on the Cisco
NX-OS device. You can also save the command alias for future use by the current user account.
SUMMARY STEPS
1. terminal alias [persist] alias-name command -string
DETAILED STEPS
Command or Action
Step 1
terminal alias [persist] alias-name command -string
Example:
switch# terminal alias shintbr show interface
brief
Command Scripts
This section describes how you can create scripts of commands to perform multiple tasks.
Running a Command Script
You can create a list of commands in a file and execute them from the CLI. You can use CLI variables in the
command script.
You cannot create the script files at the CLI prompt. You can create the script file on a remote device and
Note
copy it to the bootflash:, slot0:, or volatile: directory on the Cisco NX-OS device.
SUMMARY STEPS
1. run-script [bootflash: | slot0: | volatile:]filename
OL-29291-02
Configuring Command Aliases for a User Session
Purpose
Configures a command alias for the current user session. Use the
persist keyword to save the alias for future use by the user
account.
Do not abbreviate the persist
Note
keyword.
Cisco MDS 9000 Family NX-OS Fundamentals Configuration Guide
51