Using the NX-OS Style CLI
Note |
The APIC NX-OS style CLI uses similar syntax and other conventions to the Cisco NX-OS CLI, but the APIC operating system is not a version of Cisco NX-OS software. Do not assume that a Cisco NX-OS CLI command works with or has the same function on the APIC CLI. |
Abbreviating Commands
You can abbreviate commands and keywords by entering the first few characters of a command. The abbreviation must include sufficient characters to make it unique from other commands or keywords. If you are having trouble entering a command, check the system prompt and enter the question mark (?) for a list of available commands. You might be in the wrong command mode or using incorrect syntax. Command abbreviation is shown in the following example:
apic1# show aaa authentication
Default : local
Console : local
apic1# sh aa a
Default : local
Console : local
Command Completion
To complete a command or keyword after entering an abbreviated string, press the Tab key. The CLI completes the command or keyword only if the partial string matches only one command or keyword.
Note |
Some commands, such as |
Viewing Command Options
After typing a partial command, you can display the command options by typing a question mark (?), as shown in the following example:
apic1# show aaa ?
authentication Show AAA Authentication information
groups Show AAA group information
Command History
The history buffer stores the previous commands you entered. Using the Up arrow key (or typing Ctrl-P), you can recall commands in the history buffer, beginning with the most recent command. Repeat the key sequence to recall successively older commands. To return to more recent commands in the history buffer after recalling commands, use the Down arrow key or type Ctrl-N).
Filtering show Command Output
You can use the vertical bar (|) with any show command and include a filter option and filtering expression. The filtering is performed by matching each output line with a regular expression. By selecting different filter options you can include or exclude all output that matches the expression. You can also display all output beginning with the line that matches the expression.
An example of filtering options with the show command is as follows:
apic1# show aaa authentication
Default : local
Console : local
apic1# show aaa authentication | grep Console
Console : local
apic1#
Displaying a List of Commands and Syntax
To display a list of CLI commands and their syntax, use the show cli list command, as shown in the following example
apic1# show cli list
[ ][mode] [None ] exec
[cfg ][mode] [exec ] configure [['terminal', 't']]
[cfg ][mode] [configure ] power redundancy-policy <WORD>
[cfg ][cmd ] [power ] redundancy-mode combined|ps-redundant|redundant
.
.
.
You can filter the output of this command, as shown in the following example:
apic1# show cli list | grep ntp
[cfg ][mode] [pod ] ntp
[cfg ][cmd ] [ntp ] authenticate
[cfg ][cmd ] [ntp ] authentication-key <id> [md5 <md5>]
.
.
.
Negating a Command with the no Prefix
Almost every configuration command has a no form that can be used to disable a feature, revert to a default value, or remove a configuration.
To disable a feature, remove a created object, or revert a configuration setting to its default value, most configuration commands can be preceded with the prefix 'no'.