Using The Command Line Interface Cli
Using The Command Line Interface Cli
The following topics explain how to use the command line interface (CLI) for Firepower Threat Defense
(FTD) devices and how to interpret the command reference topics. Use the CLI for basic system setup and
troubleshooting.
Note When you deploy a configuration change using the Firepower Management Center or Firepower Device
Manager, do not use the FTD CLI for long-running commands (such as ping with a huge repeat count or size);
these commands could cause a deployment failure.
Command Modes
The CLI on a Firepower Threat Defense device has different modes, which are really separate CLIs rather
than sub-modes to a single CLI. You can tell which mode you are in by looking at the command prompt.
Regular Firepower Threat Defense CLI
Use this CLI for Firepower Threat Defense management configuration and troubleshooting.
>
Diagnostic CLI
Use this CLI for advanced troubleshooting. This CLI includes additional show and other commands,
including the session wlan console command needed to enter the CLI for the wireless access point on
an ASA 5506W-X. This CLI has two sub-modes; more commands are available in Privileged EXEC
Mode.
To enter this mode, use the system support diagnostic-cli command in the Firepower Threat Defense
CLI.
• User EXEC Mode. The prompt reflects the system hostname as defined in the running configuration.
firepower>
• Privileged EXEC Mode. Enter the enable command to enter this mode (press enter without entering
a password when prompted for a password). Note that you cannot set a password for this mode.
Access is protected by the account login to the FTD CLI only. However, users cannot enter
configuration mode within Privileged EXEC mode, so the extra password protection is not necessary.
firepower#
Expert Mode
Use Expert Mode only if a documented procedure tells you it is required, or if the Cisco Technical
Assistance Center asks you to use it. To enter this mode, use the expert command in the Firepower
Threat Defense CLI.
The prompt is username@hostname if you log in using the admin user. If you use a different user, only
the hostname is shown. The hostname is the name configured for the management interface. For example,
admin@firepower:~$
The FXOS command prompt looks like the following, but the prompt changes based on mode. See the
Cisco FXOS CLI Configuration Guide for your FXOS version and hardware model for details about
FXOS CLI usage.
Firepower-module2>
Firepower-module2#
Syntax Formatting
Command syntax descriptions use the following conventions:
Convention Description
command Command text indicates commands and keywords that you enter literally as
shown.
variable Variable text indicates arguments for which you supply values.
[x {y | z}] Nested sets of square brackets or braces indicate optional or required choices
within optional or required elements. Braces and a vertical bar within square
brackets indicate a required choice within an optional element.
Entering Commands
When you log into the CLI through the console port or an SSH session, you are presented with the following
command prompt:
>
You type the command at the prompt and press Enter to execute the command. Additional features include:
• Scrolling through command history—You can use the up and down arrow keys to scroll through the
commands that you have already entered. You can reenter or edit and reenter the commands in the history.
• Completing commands—To complete a command or keyword after entering a partial string, press the
space or Tab key. The partial string must match a single command or keyword only for it to be completed.
• Abbreviating commands—In the regular CLI, you cannot abbreviate commands. You must enter the full
command string. However, in the diagnostic CLI, you can abbreviate most commands down to the fewest
unique characters for a command; for example, you can enter show ver instead of show version.
• Stopping command output—If a command produces a lot of output, you can get out of it by pressing the
q key.
• Stopping long-running commands—If a command is not returning output fast enough, and you want to
try a different command, press Ctrl+C.
regular_expression
A regular expression, typically a simple text string. Do not enclose the expression in single or
double-quotes, these will be seen as part of the expression. Also, trailing spaces will be included in the
expression.
The following example shows how to change the output of the show access-list command to show only those
rules that apply to the inside1_2 interface.
Command Help
Help information is available from the command line by entering the following commands:
• ? to see a list of all commands.
• command_name ? to see the options for a command. For example, show ?.
• string? to show the commands or keywords that match the string. For example, n? shows all commands
that start with the letter n.
• help command_name to see the syntax and limited usage information for a command. Enter help ? to
see which commands have help pages.