Displaying set Commands

You configure the Junos OS device with the set commands. You use them to either initially configure the device or change an existing configuration. But if you display a configuration with the show operational command, it does not display the list of show commands used to create the display. However, there is a way to display the set commands, as we'll see in this section.

images Most configuration actions begin with set, and most operation commands begin with show.

One reason this book focuses on the Junos CLI is because it is filled with different ways to do the same thing. Once you get the hang of the options, you start finding all the shortcuts and expressway on ramps. One of the most frequently used and easiest configuration shortcuts is to display an existing set of commands known to work and then reuse it somewhere else, as shown here:

root@host-name> show configuration interfaces ge-0/0/1 | display set
set interfaces ge-0/0/1 unit 0 family inet address 192.168.100.1/30

You can use the command to display the whole configuration or just a portion, as just shown.

In the displayed listing, look for the set command that you want to reuse and copy it using an available copy command, such as the common keyboard command, Ctrl+C. Then move your cursor to where you want to reuse the command and paste it (by pressing Ctrl+V). You can cut and paste the entire output ...

Get Junos® OS For Dummies®, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.