Related Documentation
- EX, J, M, MX, PTX, T Series
- Getting Online Help from the Junos OS Command-Line Interface
- Switching Between Junos OS CLI Operational and Configuration Modes
- Checking the Status of a Device Running Junos OS
- Configuring a User Account on a Device Running Junos OS
- Example: Configuring a Routing Protocol
- Examples: Using the Junos OS CLI Command Completion
Getting Started with the Junos OS Command-Line Interface
As an introduction to the Junos OS command-line interface (CLI), this topic provides instructions for simple steps you take after installing Junos OS 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.
![]() |
|
To log in to a router 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# cliroot@>
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 OS Release 7.6 or later, 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. |
The CLI includes several ways to get help about commands. This section shows some examples of how to get help:
- Type ? to show the top-level commands available
in operational mode.
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
- Type file ? to show all possible completions
for the file command.
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
- Type file archive ? to show all possible completions
for the file archive 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
Related Documentation
- EX, J, M, MX, PTX, T Series
- Getting Online Help from the Junos OS Command-Line Interface
- Switching Between Junos OS CLI Operational and Configuration Modes
- Checking the Status of a Device Running Junos OS
- Configuring a User Account on a Device Running Junos OS
- Example: Configuring a Routing Protocol
- Examples: Using the Junos OS CLI Command Completion
Published: 2012-11-27
Related Documentation
- EX, J, M, MX, PTX, T Series
- Getting Online Help from the Junos OS Command-Line Interface
- Switching Between Junos OS CLI Operational and Configuration Modes
- Checking the Status of a Device Running Junos OS
- Configuring a User Account on a Device Running Junos OS
- Example: Configuring a Routing Protocol
- Examples: Using the Junos OS CLI Command Completion