[an error occurred while processing this directive] [an error occurred while processing this directive]

Understanding the CLI User Interface

You can use two interfaces to monitor, configure, troubleshoot, and manage an EX-series switch: the J-Web graphical user interface and the JUNOS command-line interface (CLI). Both of these user interfaces are shipped with the switch. This topic describes the CLI. For information about the J-Web user interface, see .

CLI Overview

JUNOS CLI is a Juniper Networks-specific command shell that runs on top of a UNIX-based operating system kernel. The CLI provides command help and command completion.

The CLI also provides a variety of UNIX utilities, such as Emacs-style keyboard sequences that allow you to move around on a command line and scroll through recently executed commands, regular expression matching to locate and replace values and identifiers in a configuration, filter command output, or log file entries, store and archive router files on a UNIX-based file system, and exit from the CLI environment and create a UNIX C shell or Bourne shell to navigate the file system, manage switch processes, and so on.

CLI Help and Command Completion

To access CLI Help, type a question mark (?) at any level of the hierarchy. The system displays a list of the available commands or statements and a short description of each.

To complete a command, statement, or option that you have partially typed, press the Tab key or the spacebar. If the partially typed letters uniquely identify a command, the complete command name appears. Otherwise, a beep indicates that you have entered an ambiguous command and the possible completions are displayed. This completion feature also applies to other strings, such as filenames, interface names, usernames, and configuration statements.

CLI Command Modes

The CLI has two modes, operational mode and configuration mode.

In operational mode, you enter commands to monitor and troubleshoot switch hardware and software and network connectivity. Operational mode is indicated by the > prompt—for example, user@switch>.

In configuration mode, you can define all properties of the JUNOS software, including interfaces, VLANs, virtual chassis information, routing protocols, user access, and several system hardware properties.

To enter configuration mode, enter the configure command—for example, user@switch>configure .

Configuration mode is indicated by the # prompt, and includes the current location in the configuration hierarchy—for example:

[edit interfaces ge-0/0/12]
user@switch#

In configuration mode, you are actually viewing and changing the candidate configuration file. The candidate configuration allows you to make configuration changes without causing operational changes to the current operating configuration, called the active configuration. When you commit the changes you added to the candidate configuration, the system updates the active configuration. Candidate configurations enable you to alter your configuration without causing potential damage to your current network operations.

To activate your configuration changes, enter the commit command.

To return to operational mode, go to the top of the configuration hierarchy and then quit—for example:

[edit interfaces ge-0/0/12]
user@switch# top
[edit]
user@switch# quit

You can also activate your configuration changes and exit configuration mode with a single command, commit and-quit.

When you commit the candidate configuration, you can require an explicit confirmation for the commit to become permanent by using the commit confirmed command. This is useful for verifying that a configuration change works correctly and does not prevent management access to the switch. After you issue the commit confirmed command, you must issue another commit command within the defined period of time (10 minutes by default) or the system reverts to the previous configuration.

Related Topics

  • JUNOS CLI User Guide
[an error occurred while processing this directive]