Fortinet black logo

CLI Reference

get

get

Use get commands to display configuration settings and values. You must have read permission for the configuration object you want to display.

show commands display user-configured setings but not default settings; get commands display all settings, including both user-configured settings and defaults.

For example, you might get the current DNS settings:

FortiADC-VM # get system dns

primary : 8.8.8.8

secondary : 0.0.0.0

FortiADC-VM #

Notice that the command displays the setting for the secondary DNS server, even though it has not been configured, or has reverted to its default value.

Also unlike show, unless used from within an object or table, get requires that you specify the object or table whose settings you want to display.

For example, at the root prompt, the following command is valid:

FortiADC-VM # get system dns

primary : 8.8.8.8

secondary : 0.0.0.0

The following command displays no output:

FortiADC-VM # get

Like show, depending on whether or not you have specified an object, get displays one of two different outputs:

  • The configuration you have just entered but not yet saved
  • The configuration as it currently exists on the flash disk

For example, immediately after configuring the secondary DNS server setting but before saving it, get displays two different outputs. In the following example, the first output from get indicates the value that you have configured but not yet saved; the second output from get indicates the value that was last saved to disk.

FortiADC-VM # config system dns

FortiADC-VM (dns) # set secondary 192.168.1.10

FortiADC-VM (dns) # get

primary : 8.8.8.8

secondary : 192.168.1.10

FortiADC-VM (dns) # get system dns

primary : 8.8.8.8

secondary : 0.0.0.0

If you were to now enter end, saving your setting to disk, get output for both syntactical forms would again match. However, if you were to enter abort at this point and discard your recently entered secondary DNS setting instead of saving it to disk, the configuration would therefore match the second output, not the first.

If you have entered settings but cannot remember how they differ from the existing configuration, the two different forms of get, with and without the object name, can be a useful way to remind yourself.

Most get commands, such as getsystem dns, are used to display configured settings. You can find information the configuration details in the corresponding config command reference.

Other get commands, such as get router info ospf, get router info routing-table, get security waf-signature-status, get security scan-report, "get security scan-task" on page 1get system performance, and get system status, are used to display status, not configuration.

get

Use get commands to display configuration settings and values. You must have read permission for the configuration object you want to display.

show commands display user-configured setings but not default settings; get commands display all settings, including both user-configured settings and defaults.

For example, you might get the current DNS settings:

FortiADC-VM # get system dns

primary : 8.8.8.8

secondary : 0.0.0.0

FortiADC-VM #

Notice that the command displays the setting for the secondary DNS server, even though it has not been configured, or has reverted to its default value.

Also unlike show, unless used from within an object or table, get requires that you specify the object or table whose settings you want to display.

For example, at the root prompt, the following command is valid:

FortiADC-VM # get system dns

primary : 8.8.8.8

secondary : 0.0.0.0

The following command displays no output:

FortiADC-VM # get

Like show, depending on whether or not you have specified an object, get displays one of two different outputs:

  • The configuration you have just entered but not yet saved
  • The configuration as it currently exists on the flash disk

For example, immediately after configuring the secondary DNS server setting but before saving it, get displays two different outputs. In the following example, the first output from get indicates the value that you have configured but not yet saved; the second output from get indicates the value that was last saved to disk.

FortiADC-VM # config system dns

FortiADC-VM (dns) # set secondary 192.168.1.10

FortiADC-VM (dns) # get

primary : 8.8.8.8

secondary : 192.168.1.10

FortiADC-VM (dns) # get system dns

primary : 8.8.8.8

secondary : 0.0.0.0

If you were to now enter end, saving your setting to disk, get output for both syntactical forms would again match. However, if you were to enter abort at this point and discard your recently entered secondary DNS setting instead of saving it to disk, the configuration would therefore match the second output, not the first.

If you have entered settings but cannot remember how they differ from the existing configuration, the two different forms of get, with and without the object name, can be a useful way to remind yourself.

Most get commands, such as getsystem dns, are used to display configured settings. You can find information the configuration details in the corresponding config command reference.

Other get commands, such as get router info ospf, get router info routing-table, get security waf-signature-status, get security scan-report, "get security scan-task" on page 1get system performance, and get system status, are used to display status, not configuration.