Junos CLI Basics

Junos software is based on FreeBSD Unix operating system. The command line interface of Junos operating system is very unique. It is hierarchy based and is very easy to use. The CLI of Junos contains two different modes; operational and configuration. Understanding Junos CLI basics is important step in learning Junos OS.

Junos CLI Basics

Operational Mode

After you are logged into the device successfully, you will see “>” greater than symbol. This symbol signifies operational mode. The default prompt of Junos operating system is user@hostname>. If you are logged in with a root user account to a Juniper device with hostname mustbegeek then your prompt will be root@mustbegeek>. In operational mode you can do basic things like health check, ping, traceroute, view various settings and logs, monitor and so on. Commands available in operational mode are :-

Junos CLI Basics

Some examples of operational mode are :-

root@mustbegeek> show system users Shows logged in users.

root@mustbegeek> show interfaces terseShows Interface information in brief. 

Configuration Mode

The configure command is typed in operational mode to get in configuration mode. The command looks like this,

root@mustbegeek> configure

root@mustbegeek# [configurational mode]

The pound symbol (#) signifies configuration mode. This mode gives you power to configure the device. If you are configuring the device then you will spend most of your time in this mode. Then run command is used in configuration mode to run operational mode commands. For example,

user@mustbegeek# run show interfaces terse [Shows interfaces brief]

In this mode you can set IP address, host name, routing protocols and so on. This is where you configure the device’s parameters to actually get it working. The edit command is used to navigate down the hierarchy and up command is used to navigate up the hierarchy. For example,

user@mustbegeek# edit protocols ospf  [gets you to protocols ospf hierarchy]

[edit protocols ospf]
user@mustbegeek# up [moves up by one step to protocols]
[edit protocols]

There are different types of configuration modes: –

  1. Shared Mode :- This is default configuration mode. When you type just configure in operational mode to get into configuration mode then shared mode is used. The configuration is shared with other users in this mode. To use this configuration mode simply type, root@mustbegeek> configure
  2. Exclusive Access :- In this mode only you can edit the configuration, other users can’t. To get in this mode simply type root@mustbegeek> configure exclusive
  3. Private Configuration :- In this mode each user have their own copy of configuration. The users can privately configure their own configuration and commit.

After making any changes don’t forget to commit the changes. For more information log on to Juniper.net


The following two tabs change content below.
Bipin is a freelance Network and System Engineer with expertise on Cisco, Juniper, Microsoft, VMware, and other technologies. You can hire him on UpWork . Follow Bipin Giri on Google+. Bipin enjoys writing articles and tutorials related to Network technologies. Some of his certifications are, MCSE:Messaging, JNCIP-SEC, JNCIS-ENT, and others.