The JUNOS CLI supports the following types of commands and statements:
When working on the command line, you are bound by specific CLI syntax rules. Some commands function very simply with just a single word necessary to run them. Others have required options that you must enter to complete the command. Additionally, commands may have options that are not required, allowing you to change the way they run or the information they return.
The command and statement summaries in the JUNOS software books show which options are required and which options are not. Options that are not required are shown with angle brackets (<>). (See Figure 10.)
Figure 10: Command Options

You configure all router properties by including statements in the configuration. A statement consists of a keyword, which is fixed text, and, optionally, an identifier. An identifier is an identifying name which you define, such as the name of an interface or a username, and which allows you and the CLI to discriminate among a collection of statements.
The following list shows the statements available at the top level of configuration mode (that is, the trunk of the hierarchy tree).
user@host# set ?
Possible completions: > accounting-options Accounting data configuration + apply-groups Groups from which to inherit configuration data > chassis Chassis configuration > class-of-service Class-of-service configuration > firewall Define a firewall configuration > forwarding-options Configure options to control packet sampling > groups Configuration groups > interfaces Interface configuration > policy-options Routing policy option configuration > protocols Routing protocol configuration > routing-instances Routing instance configuration > routing-options Protocol-independent routing option configuration > snmp Simple Network Management Protocol > system System parameters
An angle bracket ( > ) before the statement name indicates that it is a container statement and that you can set values for other statements at levels below it.
If there is no angle bracket ( > ) before the statement name, the statement is a leaf statement; you cannot define other statements at hierarchy levels below it.
A plus sign (+) before the statement name indicates that it can contain a set of values. To specify a set, include the values in brackets. For example:
- [edit]
- user@host# set policy-options community my-as1-transit
members [65535:10 65535:11]
For statements that include identifiers, such as interface names, you must specify the identifier in a JUNOS-defined format. For example, the interface name so-0/0/0 refers to a SONET/SDH interface that is on the Flexible PIC Concentrator (FPC) in slot 0, in the first PIC location, and in the first port on the Physical Interface Card (PIC). For other identifiers, such as interface descriptive text and policy and firewall term names, you can specify any name, including special characters, spaces, and tabs.
You must enclose in quotation marks (double quotes) identifiers and any strings that include a space or tab or any of the following characters:
- ( ) [ ] { } ! @ # $ % ^ & | ’
= ?
Each CLI command and each configuration statement has an access privilege level associated with it. Users can execute only those commands and configure and view only those statements for which they have access privileges.
For example, users with configure permissions can use the configure command to enter configuration mode, and users with firewall permissions can view the firewall filter configuration in configuration mode. The root login account has superuser privileges—with access to all commands and statements.
Required privilege levels are listed in command and statement summaries. For more information about setting user accounts and privileges, see the JUNOS System Basics Configuration Guide.