Four Frequently Used Junos Configuration Commands

By Walter J. Goralski, Cathy Gadecki, Michael Bushong

Configuration mode provides four commands – edit, top, up, and exit – for moving up, down and through the Junos hierarchy. Apply these commands precisely where they belong. You will use them again and again.

  • edit: Jumps you to an exact location that you specify within the hierarchy in which you are currently working. You issue the relative path based on your location in the hierarchy:

    [edit system]
    wiley@netnik# edit syslog host log
    [edit system syslog host log]

    You can only move up and down a particular hierarchy — not across the hierarchies — with the edit command. To move to another hierarchy, you must first go back to the top of configuration mode to the edit banner.

  • top: Moves you instantly to the top of the configuration hierarchy.

    [edit system syslog host log]
    wiley@netnik# top
  • Combine top and edit to quickly move to a new hierarchy location:

    [edit protocols ospf area]
    wiley@netnik# top edit system login
    [edit system login]
  • up: Takes you up one level in the configuration hierarchy. You can append a number to specify how many levels, for example, up 4.

  • exit: Returns you to the hierarchy point prior to the last edit command.