Juniper CLI Commands

To log+ in to a device and start the CLI: Log in as root: The root login account has superuser privileges, with access to all commands and statements. Start the CLI

root# cli


This > Sign indicates operational mode, while # sign shows that you are in configuration mode. Under operational mode type ?  to get the list of top-level commands

root@> ?

The possible completion will be as follows:

 file            perform file operations

help          provide help information

monitor     show real-time debugging information

mtrace      trace multicast path from source to receiver

ping          ping remote target

configure  manipulate software configuration information

quit           exit the management session

show         show system information

telnet         telnet to another host

To show all possible completions for the file command: Under operational mode type file? 

 root@> file ?

Possible completions:

<[Enter]>       execute this command

compare        compare files

copy              copy files (local or remote)

delete            delete files from the system

list                 list file information

rename         rename files

show             show file contents

between operational and configuration mode:
Entering the cli command immediately after login takes user to automatically in operational mode:

—JUNOS 17.2B1.8 built
2018-05-09 23:41:29 UTC

% cli


To enter configuration mode, type the configure command or the edit command in CLI operational mode:

user@host> configure

a. Entering configuration mode



The # sign indicates that it’s a configuration mode

b. Switching back to operational mode from

  1. configuration mode: it
    can be done in two ways in which first is the using exit command:

user@host# exit

Exiting configuration mode


While the second option is the using commit and-quit command:

user@host# commit and-quit

commit complete

  1. Exiting configuration mode


To Configure a User Account on a Juniper Networks Device: To configure a new user account on the device one needs log in as root and enter configuration mode:

root@host> configure



the ([edit])  banner shows configuration edit mode (at the top of the
hierarchy). After that one needs to change to the [edit system login] section of the configuration:


root@host# edit system login

[edit system login]


Now add a new user account. In the example, user1 represents a username:

[edit system login]

root@host# edit user user1

This example adds an account user1. Now to configure a full name for the account including spaces use the set full-name command and enclose the entire name in quotation marks (” “):

[edit system login user user1]

root@host# set full-name “User One”

Then configure an account class for a user account which will set user access privileges  for the account.

[edit system login user user1]

root@host# set class super-user

Configure an authentication method and password for the account:

[edit system login user user1]

root@host# set authentication plain-text-password

New password:

Retype new password:

Commit the configuration changes because It’s essential to commit the configuration changes otherwise changes won’t be active

[edit system login user user1]

root@host# commit

commit complete

Check the Status of a Juniper Networks Device: In operational mode, you can use show commands to check the status of the device and monitor the activities on the device.

root@>  show

To display the list of show commands: to help you become familiar with show commands type show? you can use to monitor the router:

root@>  show ?

Possible completions may be as follows:

 accounting             show accounting profiles and records

bgp                         show Border Gateway Protocol information

chassis                  show chassis informationass-of-service    show class-of-service (CoS) information

cli                          show command-line interface settings

configuration        show current configuration

Use the show chassis routing-engine command to
view the Routing Engine status:

root@>  show
chassis routing-engine 

Routing Engine status:

    Slot 0:

    Current state                   Master

priority                Master (default)

    Temperature                    31 degrees C / 87 degrees F

temperature            32 degrees C / 89
degrees F

    DRAM                                  768 MB

utilization          84 percent

Leave a Reply

Your email address will not be published. Required fields are marked *