CLI Introduction

CLI Introduction

Quiz Page

Test your understanding of key concepts with a short quiz. A quick way to check what you know before moving on.

Lab Page

Hands-on practice exercises to reinforce what you’ve learned. Work through real scenarios in a guided environment.

Notes

All Juniper devices run the Junos operating system. Like any network operating system, this includes a CLI (SSH, Telnet), web interface, and automation options.

Junos is based on either FreeBSD, or a customised version of Linux, depending on the Junos version.

The Junos CLU has two modes; Operational, which has the ‘>’ character as the prompt, and Configuration, which has the ‘#’ as the prompt.

The configuration itself is organised into a hierarchy. This is a tree structure, which in a sense is like a file system containing files. All configuration items are grouped into areas.

This configuration method may appear intimidating at first, as it looks a bit like a programming language. However, it’s really not difficult.

Config groups are contained within curly braces. Configuration items end with a semi-colon.

We can navigate around the hierarchy using commands like editup, and top.

As with most CLI’s, we have options like ‘?’ to show us commands, tab completion for commands and variables, and space complete for commands.

Changes are not applied immediately. They need to be committed.

Command Summary

CommandModeDescription
configureoperationalEnter configuration mode
helpoperationalBring up the help menu
help referenceoperationalLookup a command
help aproposoperationalSearch for commands
help tip clioperationalGet tips
help topicoperationalGet information on features and configuration tasks
set cli complete-on-space offoperationalDisable space complete
start shelloperationalEnter the FreeBSD/Linux Shell
exitshellExit the shell
show configurationoperationalShow the configuration
showconfigurationShow the configuration
| matcheitherFilter output for this text
| excepteitherFilter output (remove lines with this text)
| No-moreeitherDo not paginate output
| find VALUEeitherStart where a match is found (like ‘begin’ in IOS)
| resolveeitherConvert IP’s to names
| trimeitherTrim columns from each line
| match “val-1|val-2|val-3”eitherPerform an OR search within match
runconfigurationRun an operational mode command from configuration mode
editconfigurationMove around the configuration hierarchy
upconfigurationMove up a hierarchy level
topconfigurationMove to the top of the hierarchy
setconfigurationAdd configuration
deleteconfigurationRemove configuration
set cli screen-lengthoperationalSet cli screen-length
set cli screen widthoperationalSet cli screen width
commitconfigurationApply configuration

Keyboard Shortcuts

Ctrl-U erases the entire command you’ve been typing

Ctrl-W erases word by word

Ctrl-A moves to the start of the line

Ctrl-E moves to the end

Alt-B move back one word

Alt-F move forward one word

Ctrl-K Delete from the cursor to the end of the line

Ctrl-L Redraw the current line

Ctrl-P / N Repeat previous or next command in the history

Additional References

JunOS Evolved

Leave a Reply