Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Junos OS CLI Online Help Features

The Junos OS CLI online help provides the following features for ease of use and error prevention:

Help for Omitted Statements

If you have omitted a required statement at a particular hierarchy level, when you attempt to move from that hierarchy level or when you issue the show command in configuration mode, a message indicates which statement is missing. For example:

[edit protocols pim interface so-0/0/0]user@host# topWarning: missing mandatory statement: 'mode'[edit]user@host# show
protocols {pim {interface so-0/0/0 {priority 4;version 2;# Warning: missing mandatory statement(s): 'mode'}}}

Using CLI Command Completion

The Junos OS CLI provides you a command completion option that enables Junos OS to recognize commands and options based on the initial few letters you typed. That is, you do not always have to remember or type the full command or option name for the CLI to recognize it.

  • To display all possible command or option completions, type the partial command followed immediately by a question mark.
  • To complete a command or option that you have partially typed, press Tab or the Spacebar. If the partially typed letters begin a string that uniquely identifies a command, the complete command name appears. Otherwise, a prompt indicates that you have entered an ambiguous command, and the possible completions are displayed.

Command completion also applies to other strings, such as filenames, interface names, and usernames. To display all possible values, type a partial string followed immediately by a question mark. To complete a string, press Tab.

Using Command Completion in Configuration Mode

The CLI command completion functions also apply to the commands in configuration mode and to configuration statements. Specifically, to display all possible commands or statements, type the partial string followed immediately by a question mark. To complete a command or statement that you have partially typed, press Tab or the Spacebar.

Command completion also applies to identifiers, with one slight difference. To display all possible identifiers, type a partial string followed immediately by a question mark. To complete an identifier, you must press Tab. This scheme allows you to enter identifiers with similar names; then press the Spacebar when you are done typing the identifier name.

Displaying Tips About CLI Commands

To get tips about CLI commands, issue the help tip cli command. Each time you enter the command, a new tip appears. For example:

user@host> help tip cliJunos tip:Use 'request system software validate' to validate the incoming softwareagainst the current configuration without impacting the running system.user@host> help tip cli Junos tip:Use 'commit and-quit' to exit configuration mode after the commit hassucceeded. If the commit fails, you are left in configuration mode.

You can also enter help tip cli number to associate a tip with a number. This enables you to recall the tip at a later time. For example:

user@host> help tip cli 10 
JUNOS tip:
Use '#' in the beginning of a line in command scripts to cause the
rest of the line to be ignored.

user@host> help tip cli       
JUNOS tip:
Use the 'apply-groups' statement at any level of the configuration
hierarchy to inherit configuration statements from a configuration group.

user@host>

Published: 2013-01-15