[Contents]
[Prev]
[Next]
[Index]
[Report an Error]
Introducing the JUNOS Command-Line Interface
The JUNOS command-line
interface (CLI) is the software interface you use to access a JUNOS
device—whether from the console or through a network connection.
The JUNOS CLI is a Juniper Networks-specific command
shell that runs on top of a FreeBSD UNIX-based operating system kernel.
By leveraging industry-standard tools and utilities, the CLI provides
a powerful set of commands that you can use to monitor and configure
devices running JUNOS software. (See Figure 1.) The CLI is a straightforward command interface.
You type commands on a single line, and the commands are executed
when you press the Enter key.
Figure 1: Monitoring and Configuring Routers

Key Features of the CLI
The JUNOS CLI commands and statements follow a
hierarchal organization and have a regular syntax. The JUNOS CLI provides
the following features to simplify CLI use:
- Consistent command names—Commands that provide the
same type of function have the same name, regardless of the portion
of the software on which they are operating. For example, all show commands display software information and statistics, and
all clear commands erase various types of system information.
- Lists and short descriptions of available commands—Information
about available commands is provided at each level of the CLI command
hierarchy. If you type a question mark (?) at any level,
you see a list of the available commands along with a short description
of each command. This means that if you already are familiar with
the JUNOS software or with other routing software, you can use many
of the CLI commands without referring to the documentation.
- Command completion—Command completion for command
names (keywords) and for command options is available at each level
of the hierarchy. To complete a command or option that you have partially
typed, press the Tab key or the Spacebar. If the partially typed letters
begin a string that uniquely identifies a command, the complete command
name appears. Otherwise, a beep indicates that you have entered
an ambiguous command, and the possible completions are displayed.
Completion also applies to other strings, such as filenames, interface
names, usernames, and configuration statements.
- Industry-standard technology—With FreeBSD UNIX
as the kernel, a variety of UNIX utilities are available on the JUNOS
CLI. For example, you can:
- Use regular expression matching to locate and replace
values and identifiers in a configuration, filter command output,
or examine log file entries.
- Use Emacs-based key sequences to move around on a command
line and scroll through the recently executed commands and command
output.
- Store and archive JUNOS device files on a UNIX-based file
system.
- Use standard UNIX conventions to specify filenames and
paths.
- Exit from the CLI environment and create a UNIX C shell
or Bourne shell to navigate the file system, manage router processes,
and so on.
Related Topics
[Contents]
[Prev]
[Next]
[Index]
[Report an Error]