Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
 

Related Documentation

 

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.

  • 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 devices running Junos OS.
  • Before you begin, make sure your device hardware is set up and Junos OS 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.

To log in to a router and start the CLI:

  1. Log in as root.

    The root login account has superuser privileges, with access to all commands and statements.

  2. 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:

  1. 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
    
  2. 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
    
  3. 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

 

Published: 2012-11-27

 

Related Documentation

 

Published: 2012-11-27