0% found this document useful (0 votes)
15 views3 pages

Exercise 2

This document provides instructions for exploring basic CLI commands on a FortiGate device. It covers commands like get, show, and execute to view system status, interfaces, and help options. It also demonstrates CLI navigation techniques like command history, tab completion, and abbreviations.

Uploaded by

manuteoihu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Exercise 2

This document provides instructions for exploring basic CLI commands on a FortiGate device. It covers commands like get, show, and execute to view system status, interfaces, and help options. It also demonstrates CLI navigation techniques like command history, tab completion, and abbreviations.

Uploaded by

manuteoihu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Exercise 2: Working With the CLI

In this exercise, you will access a FortiGate using the CLI.

Explore the CLI


You will become familiar with the FortiGate CLI.

To explore the CLI

1. Go to the Local-FortiGate CLI.

2. At the login prompt, type admin.

3. In the Password field, type password, and then press Enter.

4. Enter the following command:

get system status

This command displays basic status information about FortiGate. The output includes the
FortiGate serial number, operation mode, and so on. When the More prompt appears on
the CLI, perform one of the following actions:

Action Command

To continue scrolling Press the space bar.

To scroll one line at a time Press Enter.

To exit Type q.

5. Enter the following command:

get ?

The ? character is not displayed on the screen.

This command shows all options that the CLI will accept after the get command.
Depending on the command, you may need to enter additional words to completely specify
a configuration option.
6. Press the up arrow key.

This displays the previous get system status command.

7. Try some of the control key sequences shown in the following table:

Action Command

Previous command Up arrow

Next command Down arrow

Beginning of line Ctrl+a

End of line Ctrl+e

Back one word Ctrl+b

Forward one word Ctrl+f

Delete current character Ctrl+d

Clear screen Ctrl+l

Abort command and exit Ctrl+c

Auto repeat history Ctrl+p

8. Enter the following command:

execute ?

This command lists all options that the CLI accepts after the execute command.

9. Type exe, and then press the Tab key.

Notice that the CLI completes the current word.

10. Press the space bar, and then press the Tab key three times.

Each time you press the Tab key, the CLI replaces the second word with the next possible
option for the execute command, in alphabetical order.
You can abbreviate most commands. In lessons and labs, many of the commands that
you see are in abbreviated form. For example, instead of typing execute, you can
type exe.

Use this technique to reduce the number of keystrokes that are required to enter a
command. Often, experts can configure FortiGate faster using the CLI than using the
GUI.

If there are other commands that start with the same characters, your abbreviation must
be long enough to be specific, so that FortiGate can distinguish them. Otherwise, the
CLI displays an error message about ambiguous commands.

11. On a new line, enter the following command to view the port3 interface
configuration (hint: try using the shortcuts you just learned about):

show system interface port3

12. Enter the following command:

show full-configuration system interface port3

Stop and think!

Compare both outputs. How are they different?

The show full-configuration command displays all the configuration settings for the interface.
The show command displays only those values that are different from the default values.
LAB-1 > Working With the CLI

You might also like