1.2. Basic CLI Usage

Entering Commands

The commands described in this guide can be run by typing the command name at the system prompt and then pressing the return key. Many commands require options to be set to run. If a required option is missing a brief syntax help will be displayed.

User roles

Some commands and options cannot be used unless the logged-in user has administrator privileges. This is indicated in this guide by a note following the command or Admin only written next to an option.

Function keys

There are a number of function keys that are used in the CLI.

Backspace
Delete the character to the left of the cursor.
Tab
Complete current word.
Ctrl-A or Home
Move the cursor to the beginning of the line.
Ctrl-B or Left Arrow
Move the cursor one character to the left.
Ctrl-C
Clear line or cancel page view if more than one page of information is shown.
Ctrl-D or Delete
Delete the character to the right of the cursor.
Ctrl-E or End
Move the cursor to the end of the line.
Ctrl-F or Right Arrow
Move the cursor one character to the right.
Ctrl-K
Delete from the cursor to the end of the line.
Ctrl-N or Down Arrow
Show the next entry in the command history.
Ctrl-P or Up Arrow
Show the previous entry in the command history.
Ctrl-T
Transpose the current and the previous character.
Ctrl-U
Delete from the cursor to the beginning of line.
Ctrl-W
Delete word backwards.

The CLI History

Every time a command is run, the command line is added to a history list. The up and down arrow keys are used to access previous command lines (up arrow for older command lines and down arrow to move back to a newer command line). See also Section 2.4.4, history.

Example 1.2. The CLI History

Using the command line history via the arrow keys:

Device:/> show Address
Device:/> (up arrow)
Device:/> show Address (the previous commandline is displayed)

Adding and Removing IP Address Group Members

With IP address groups, it is often useful to be able to add new members to a group or remove existing group members. This is easily done with the web interface which provides an intuitive display showing the available objects and the objects in the group. It can also be done with the CLI but requires a special command syntax.

Suppose there already exists an IP4Group object called my_ip_group. It has three member IP4Address objects called my_ip_1, my_ip_2 and my_ip_3. Suppose that the object my_ip_2 is to be removed from the group. The command would be:

Device:/> set Address IP4Group my_ip_group Members-=my_ip_2

The option Members-= can remove one or more members of the group. To add one or more members to a group, the option Members+= can be used. Suppose that the IP4Address objects my_ip_4 and my_ip_5 are to be added to the group. The command would be:

Device:/> set Address IP4Group my_ip4_group Members+=my_ip_4,my_ip_5