As an introduction to the JUNOS command-line interface (CLI), this topic provides instructions for simple steps you take after installing the JUNOS software on the device. It shows you how to start the CLI, view the command hierarchy, and make small configuration changes. The related topics listed at the end of this topic provide you more detailed information about using the CLI.
![]() |
Note: The instructions and examples in this topic are based on sample M-series and T-series routers. You can use them as a guideline for entering commands on your JUNOS devices. |
Before You Begin
Make sure your device hardware is set up and the JUNOS software is installed. You must have a direct console connection to the device or network access using SSH or Telnet. If your device is not set up, follow the installation instructions provided with the device before proceeding.
Logging On to a JUNOS Device
Log in to the router and start the CLI:
The root login account has superuser privileges, with access to all commands and statements.
- root# cli
- root@>
The > command prompt shows you are in operational mode. Later, when you enter configuration mode, the prompt will change to #.
![]() |
Note: If you are using the root account for the first time on the device, remember that the device ships with no password required for root, but the first time you commit a configuration with JUNOS Release 7.6 software (or a later release), you must set a root password. Root access is not allowed over a telnet session. To enable root access over an SSH connection, you must configure the system services ssh root-login allow statement. |
Displaying JUNOS Commands
The CLI includes several ways to get help about commands. This section shows some examples of how to get help.
root@> ?
Possible completions: clear Clear information in the system configure Manipulate software configuration information diagnose Invoke diagnose script 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 quit Exit the management session request Make system-level requests restart Restart software process set Set CLI properties, date/time, craft interface message show Show system information ssh Start secure shell on another host start Start shell telnet Telnet to another host test Perform diagnostic debugging traceroute Trace route to remote host
root@> file ?
Possible completions: <[Enter]> Execute this command archive Archives files from the system checksum Calculate file checksum 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 source-address Local address to use in originating the connection | Pipe through a command
root@> file archive ?
Possible completions: compress Compresses the archived file using GNU gzip (.tgz) destination Name of created archive (URL, local, remote, or floppy) source Path of directory to archive
For more information about getting help about commands and statements, see Getting Online Help.