Juniper Junos OS keyboard shortcuts

Junos OS CLI keys and commands, taken from Juniper's CLI User Guide for Junos OS (published June 2026, with release notes up to Junos OS 25.4R1): the Emacs-style line-editing keys, help and completion, configuration mode, commit and rollback, and everyday show commands and output pipes. Each Esc key also works with Alt, so Esc + B equals Alt + B. Configuration changes wait in a candidate until commit, and capitals stand for your own values.

132 shortcuts in 9 sections. Checked row by row against Juniper Networks on . Edited by Jay.

Command-line editing 20

Juniper says these key sequences are the ones Emacs uses, and that its table shows only some of them.

ActionShortcut
Move back one characterCtrl+B
Move back one wordEsc+BorAlt+B
Move forward one characterCtrl+F
Move forward one wordEsc+ForAlt+F
Go to start of lineCtrl+A
Go to end of lineCtrl+E
Delete previous characterCtrl+HorDeleteorBackspace
Delete character under cursorCtrl+D
Delete to end of lineText left of the cursor stays; only the rest of the line is removed.Ctrl+K
Clear the whole lineUnlike Ctrl + K, it removes text on both sides of the cursor.Ctrl+UorCtrl+X
Delete previous wordCtrl+WorEsc+BackspaceorAlt+Backspace
Delete next wordThe counterpart of Ctrl + W, removing the word to the right of the cursor.Esc+DorAlt+D
Paste last deleted textCtrl+Y
Redraw the lineCtrl+L
Previous command in historyRepeat it to step to older commands; Ctrl + N walks back toward newer ones.Ctrl+P
Next command in historyCtrl+N
Reverse history searchIncremental: matching earlier lines appear while you type, newest first.Ctrl+R
Search history by word prefixType the start of a word first; the CLI looks for earlier words that begin with it.Esc+/orAlt+/
Cycle through recent wordsEach press steps further back through words typed on earlier command lines.Esc+.orAlt+.
Repeat a key sequenceType the count first, then the key sequence that should run that many times.Esc+NUMBERthenSEQUENCEorAlt+NUMBERthenSEQUENCE

Help and completion 10

ActionShortcut
List available commandsAt an empty prompt it lists what is valid in the current mode, each with a one-line description.?
List options of a commandLeave a space before the question mark; the CLI then retypes your command so you can carry on.COMMAND ?
List completions for a prefixNo space before the question mark: in operational mode c? offers clear and configure.c?
Complete a partial commandAn ambiguous prefix shows the possible completions instead; Tab also completes file, interface and user names.TaborSpace
Show help on the help systemTyped alone and followed by Enter, it introduces ? and the help commands.help
Search help by textMatches command or statement names and their help strings; quote a string that contains spaces.help apropos STRING
Show usage guidelinesThe text comes from the Junos OS configuration guides, so it explains how a statement is used.help topic WORD
Show a statement summaryGives the short reference entry rather than the longer guideline text of help topic.help reference STATEMENT-NAME
Explain a system log messagehelp syslog SYSLOG-TAG
Show a CLI tipEach run prints another tip; add a number to bring back a particular one later.help tip cli

Modes and navigation 16

Typing exit at the top level while changes are uncommitted asks you to confirm before configuration mode closes.

ActionShortcut
Start the CLI from the shellAfter logging in as root, run it to reach the CLI; the > prompt marks operational mode.cli
Enter configuration modeThe prompt changes from > to # and an [edit] banner shows where you are in the hierarchy.configure
Configure with a lockOthers can enter configuration mode but cannot commit; your uncommitted changes are discarded on exit.configure exclusive
Edit a private candidateEach user edits a separate copy, and a commit applies only your own changes.configure private
Refresh a private candidateBrings changes that other users have committed into your configure private copy.update
Log out a lock holderEnds the session holding a configure exclusive lock; the pid appears in the message shown when you hit the lock.request system logout pid PID_NUMBER
Move into a hierarchy levelCreates the level when it does not exist yet; the banner then shows the new path.edit HIERARCHY-LEVEL
Go up one levelup
Run a command levels higherThe guide runs up 2 activate system from inside [edit protocols bgp].up NUMBER COMMAND
Jump to the top levelThe banner returns to [edit], from any depth in the hierarchy.top
Run a command from the topSaves a separate top step, as in top edit system login from deep inside interfaces.top COMMAND
Leave the current levelReturns to where you were before your latest edit command; at the top it leaves configuration mode, as quit does.exit
Leave configuration modeWorks from any level and skips the uncommitted-changes question, which suits scripts.exit configuration-mode
Run an operational commandShows operational output, such as a show command, without leaving configuration mode.run COMMAND
List users editing the configstatus
Comment lineEverything after a leading # is ignored, so command files can carry notes.#COMMENT-STRING

Changing the configuration 16

ActionShortcut
Add or change a statementBuilds the hierarchy like edit does, but you stay at your current level.set HIERARCHY-LEVEL VALUE
Remove a statementEverything beneath it goes too, and the feature returns to its default behaviour.delete STATEMENT-PATH IDENTIFIER
Clear everything at this levelWithout arguments it asks for confirmation, and the default answer is no.delete
Delete items by patternRemoves related items such as channelized interfaces or static routes in one go.wildcard delete STATEMENT-PATH IDENTIFIER REGULAR-EXPRESSION
Duplicate a statementCopies the whole hierarchy beneath it, which helps when many interfaces share settings.copy EXISTING-STATEMENT to NEW-STATEMENT
Rename a statementThe guide renames logical unit 100 of lo0; any statement or identifier can be renamed this way.rename interfaces lo0 unit 100 to unit 102
Place an item in orderUse before or after; without insert, a new identifier is added at the end of the list.insert STATEMENT-PATH IDENTIFIER1 after IDENTIFIER2
Disable without deletingMarks it inactive, so it stays in the configuration but is ignored at commit.deactivate STATEMENT
Re-enable a statementRemoves the inactive tag; the statement takes effect at the next commit.activate STATEMENT
Attach a commentThe comment sits on the line above the statement; annotating again replaces it.annotate STATEMENT "COMMENT-STRING"
Find and replace in the configAccepts POSIX regular expressions, for instance to rename an interface after a PIC moves slots.replace pattern PATTERN1 with PATTERN2
Paste configuration inPaste, press Enter, then Ctrl + D on a new line; incoming statements win any conflict.load merge terminal
Merge a file into the candidateAdds the file to what is already there, for example a new BGP section.load merge FILENAME
Replace the whole candidateThrows away the current candidate and loads a complete saved configuration instead.load override FILENAME
Load the factory configurationThe guide follows it on switches with delete system commit factory-settings and a commit.load factory-default
Save config to a fileSaves from the current level down, uncommitted changes included, by default to your home directory.save FILENAME

Commit and rollback 16

If a commit confirmed is not confirmed in time, the device rolls back and broadcasts a message to every logged-in user.

Since Junos OS 24.2R1, setting force-commit-log under [edit system commit] makes commit refuse to run without a comment.

ActionShortcut
Activate the candidateRuns a syntax check first and can be issued from any hierarchy level.commit
Validate without activatingPoints to the location of any error; nothing is applied to the running device.commit check
Commit with automatic rollbackUnless commit or commit check follows within 10 minutes, the previous configuration comes back.commit confirmed
Set the confirmation windowReplaces the 10-minute default; the guide also shows commit confirmed 1.commit confirmed MINUTES
Commit and leave config modeIf the commit fails you remain in configuration mode to fix it.commit and-quit
Commit with a descriptionUp to 512 characters on one line; show system commit lists the comments later.commit comment COMMENT-STRING
Schedule a commitGive a quoted time or reboot; the check runs at once and you are logged out of configuration mode.commit at TIME
Watch the commit stepsPrints each stage with a timestamp, down to the daemons being signalled.commit | display detail
Discard uncommitted changesLoads the last committed configuration into the candidate; commit to make it active again.rollback
Load an older configurationNumbers run from 0, the most recent, to 49, the oldest kept.rollback NUMBER
List saved configurationsShows each rollback number with date, time, user and the method of commit.rollback ?
Load the rescue configurationFails with an error, leaving the configuration untouched, when no viable rescue file exists.rollback rescue
Save a rescue configurationKeeps the most recently committed configuration as a known-good fallback.request system configuration rescue save
Diff candidate against activeLines only in the candidate start with +, lines only in the active file with -.show | compare
Diff against an older commitUse the same index as rollback, from 0 for the latest to 49.show | compare rollback NUMBER
List commit historyAlso shows when a pending commit confirmed will roll back, and any commit comments.show system commit

Viewing the configuration 5

ActionShortcut
Show the candidate hereIn configuration mode it prints the current level; add a path for another level.show
Show config as set commandsPrints the set commands that would rebuild everything from the top, ready to cut, edit and paste.show | display set
Search the set commandsThe guide matches address to list every interface address line.show | display set | match REGULAR-EXPRESSION
Show the active configurationThe operational-mode view of the current system configuration.show configuration
Active config as set linesParts you are not allowed to view appear as ACCESS-DENIED.show configuration | display set

Monitoring the device 23

ActionShortcut
Show software versionsshow version
Show interface detailsshow interfaces
One-line interface statusOne line per interface with admin and link state; a pattern such as ge-* narrows the list.show interfaces terse
Show the routing tableshow route
Short routing table viewshow route brief
Show the forwarding tableReads the entries in the kernel table that forwards packets.show route forwarding-table
Check chassis alarmsshow chassis alarms
Show environment readingsshow chassis environment
List installed hardwarePrints each component with its version, part number and serial number.show chassis hardware
Show Routing Engine statusIncludes temperature, memory and CPU use, uptime and load averages.show chassis routing-engine
Show free storageLists each file system with its size, used and available space.show system storage
Free up storage spaceRotates logs and deletes unneeded files; add dry-run to review the list first.request system storage cleanup
List processes by CPU useshow system processes extensive
Show logged-in usersshow system users
List log filesCovers log file contents as well as the most recent user logins.show log
Read the messages logReboot requests are among the events recorded there.show log messages
List files on the deviceWithout a path it shows your home directory.file list
Print a fileThe guide uses it to read batch commit trace files under /var/log.file show FILENAME
Test reachabilityping HOST
Trace the path to a hosttraceroute HOST
Restart the routing processJuniper advises restarting a process only when its support team asks you to.restart routing
Reboot the deviceRun it from the console: network sessions drop before the output finishes.request system reboot
Halt the operating systemRun it from a direct console connection before powering the device off.request system halt

Paging and CLI settings 11

ActionShortcut
Show the next lineWorks at the more prompt that appears when output is longer than the screen.Enter
Show the next screenSpace
List more-prompt commandsCovers navigation, searching and saving while output is paused.H
Turn off pagingPrints the whole output in one go instead of pausing at each ---(more)--- prompt.| no-more
Stay in the pager at the endYou can still scroll or search after the last screen instead of returning to the prompt.| hold
Show CLI settingsReports screen length, screen width and whether Space completes words.show cli
Set lines per screenThe default is 24; a length of 0 scrolls straight through without the more prompt.set cli screen-length LENGTH
Set characters per lineThe default is 80; values are 0 or 40 through 1024, and 0 suits scripts.set cli screen-width WIDTH
Complete with Tab onlySpace stops completing words; complete-on-space on brings it back.set cli complete-on-space off
Log out idle sessionsThe value is in minutes, up to 100,000; 0 switches the timeout off.set cli idle-timeout TIMEOUT
Timestamp command outputWithout a format the stamp looks like Feb 08 17:20:49.set cli timestamp

Filtering output 15

ActionShortcut
Keep matching linesQuote the expression when it contains spaces, operators or wildcard characters.| match REGULAR-EXPRESSION
Hide matching linesThe guide lists logged-in users with show system users | except root.| except REGULAR-EXPRESSION
Start at the first matchSkips everything before the first matching line, such as a route prefix.| find REGULAR-EXPRESSION
Count output lines| count
Show the end of outputHandy for log files, where the newest entries are at the bottom.| last LINES
Cut leading columnsUseful for stripping the date and time from system log lines; negative values are refused.| trim COLUMNS
Save output to a fileOverwrites the file; append adds to it instead.| save FILENAME
Add output to a file| append FILENAME
Show and save outputThe output stays on screen while the same text is written to the file.| tee FILENAME
Refresh output periodicallyEvery second by default, or at an interval of up to 604,800 seconds.| refresh SECONDS
Resolve IP addresses to namesOperational mode only; without DNS the lookup fails and addresses stay as they are.| resolve
Output as XML| display xml
Output as JSON| display json
Show a command's RPC tagsThe guide shows show route mapping to the get-route-information request.| display xml rpc
Send output to other usersUse user ACCOUNT@TERMINAL instead of all to reach one session.| request message all

Notes

Editing the command line

The cursor reaches either end of the line with Ctrl + A or Ctrl + E, moves one character with Ctrl + B or Ctrl + F, and Esc + B and Esc + F move a word. Ctrl + W deletes the word before the cursor and Esc + D the word after; Ctrl + K deletes to the end of the line and Ctrl + U the whole line, with Ctrl + Y pasting back the last deletion. Ctrl + P and Ctrl + N walk the command history and Ctrl + R searches it. Ctrl + L redraws the line and Ctrl + H is backspace. Tab completes commands and ? lists what can follow.

Configuration mode and commit

configure enters configuration mode, where changes go into a candidate configuration and nothing takes effect until commit. show | compare diffs the candidate against the active configuration, commit check validates without applying, and commit confirmed MINUTES applies the change but rolls it back automatically unless a commit or commit check confirms it in time (10 minutes by default) — the safety net for a change that could cut off your access to the device. rollback 1 loads the previously committed configuration into the candidate, and it becomes active again only after another commit.

Operational commands

show version, show interfaces terse, show route, show chassis alarms and show configuration give a quick picture of an unfamiliar device. Any output can be filtered with | match REGULAR-EXPRESSION, | except REGULAR-EXPRESSION and | count, and show | display set prints the configuration as the set commands that would rebuild it from the top level. In configuration mode, run COMMAND reaches the same operational commands without leaving the hierarchy.

Questions

Why do Junos editing keys look like Emacs?

Juniper's CLI User Guide says its keyboard sequences are the same as those used in Emacs. Each word-level key takes Esc or Alt as its first key, so Esc + B and Alt + B both move back one word.

How does commit confirmed protect a remote change?

commit confirmed activates the candidate for 10 minutes, or for the time you give in commit confirmed MINUTES. A commit or commit check within that window keeps it; otherwise the device returns to the previous configuration, which restores access if the change cut you off, and tells all logged-in users.

How do I see what I changed before committing?

Run show | compare in configuration mode. Statements only in the candidate are marked with a plus sign and statements only in the active configuration with a minus sign. show | compare rollback NUMBER compares against an earlier commit instead.

How do I stop the ---(more)--- prompt?

Add | no-more to a single command to print its output all at once. For the whole session, set cli screen-length LENGTH with a length of 0 turns the more prompt off; the default is 24 lines.

What is the difference between configure private and configure exclusive?

configure private gives each user a separate candidate, and a commit applies only that user's changes. configure exclusive locks the configuration so that nobody else can commit, and discards your uncommitted changes when you leave.

Which Junos release does this page follow?

The rows come from Juniper's CLI User Guide for Junos OS, published on 18 June 2026; its newest feature note is for Junos OS and Junos OS Evolved Release 25.4R1. Juniper warns that commands and options vary by platform and release; ? shows what your device accepts.

Sources and checks

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.