0% found this document useful (0 votes)
49 views11 pages

FortiTester-7 2 3-CLIReference

This document provides an overview of the CLI for the FortiTester appliance and describes commonly used CLI commands. It includes sections on getting CLI help, abbreviating commands, automatically completing commands, and lists some example CLI commands for tasks like viewing system information and configuration, managing interfaces and routes, and rebooting or upgrading the device. Links are also provided to external Fortinet resources for documentation, training, support, and legal documents.

Uploaded by

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

FortiTester-7 2 3-CLIReference

This document provides an overview of the CLI for the FortiTester appliance and describes commonly used CLI commands. It includes sections on getting CLI help, abbreviating commands, automatically completing commands, and lists some example CLI commands for tasks like viewing system information and configuration, managing interfaces and routes, and rebooting or upgrading the device. Links are also provided to external Fortinet resources for documentation, training, support, and legal documents.

Uploaded by

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

CLI Reference

FortiTester 7.2.3
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com

FORTINET VIDEO GUIDE


https://video.fortinet.com

FORTINET BLOG
https://blog.fortinet.com

CUSTOMER SERVICE & SUPPORT


https://support.fortinet.com

FORTINET TRAINING & CERTIFICATION PROGRAM


https://www.fortinet.com/training-certification

NSE INSTITUTE
https://training.fortinet.com

FORTIGUARD CENTER
https://www.fortiguard.com

END USER LICENSE AGREEMENT


https://www.fortinet.com/doc/legal/EULA.pdf

FEEDBACK
Email: [email protected]

May 25, 2023


FortiTester 7.2.3 CLI Reference
64-723-912821-20230525
TABLE OF CONTENTS

Change log 4
Overview 5
Getting CLI help 6
Abbreviating commands 7
Completing commands automatically 7
CLI commands 9

FortiTester 7.2.3 CLI Reference 3


Fortinet Inc.
Change log

Date Change description

May 25, 2023 Initial release.

FortiTester 7.2.3 CLI Reference 4


Fortinet Inc.
Overview

Overview

You can configure some settings through a connection to the command-line interface (CLI).
This requires a terminal emulator such as PuTTY, TeraTerm, or a terminal server.
To connect to the CLI via a serial console:
1. Use the console cable to connect the appliance console port to your terminal server or computer.
2. On your computer or terminal server, start the terminal emulator. Use the following settings:
l Baud rate: 9600
l Data bits: 8
l Parity: None
l Stop bits: 1
l Flow control: None
3. Press Enter on your keyboard to connect to the CLI.

After you configure the management port, you can connect to the management port and use
the CLI remotely by SSH or Telnet.

FortiTester 7.2.3 CLI Reference 5


Fortinet Inc.
Getting CLI help

Getting CLI help

Enter a question mark (?) at the command prompt to display a list of CLI commands and their description.

Enter config system ? to display all configuration system related commands and their descriptions.

Enter diagnose ? to display all diagnose related commands and their descriptions.

Enter execute ? to display all execute related commands and their descriptions.

Enter execute restore ? to display all execute and restore related commands and their descriptions.

Enter get ? to display all get related commands and their descriptions.

Enter show system ? to display all show system related commands and their descriptions.

FortiTester 7.2.3 CLI Reference 6


Fortinet Inc.
Getting CLI help

Abbreviating commands

You can abbreviate words in the command line to their smallest number of non-ambiguous characters.
For example, the get system status command can be abbreviated to g sy stat.

Completing commands automatically

Enter a word or part of a word and then press ?. No space is required before the command.
For example, enter e and then ?. You can see the following information:

The table below lists the shortcuts and descriptions:

Action Shortcut Description

List ? List CLI commands and their descriptions.


Tab Display the key command word. Press Tab
multiple times to switch among different words,
such as get, show, and config, etc.

Recall ↑ or Ctrl + P Recall the previous command. Command


memory is limited to the current session.

↓ or Ctrl + N Recall the next command.

Cursor move ←or → Move the cursor within the command line.
Ctrl + A Move the cursor to the beginning of the command
line.
Ctrl + E Move the cursor to the end of the command line.

FortiTester 7.2.3 CLI Reference 7


Fortinet Inc.
Getting CLI help

Action Shortcut Description


Ctrl + B Move the cursor after one word.
Ctrl + F Move the cursor before one word.

Delete Ctrl + D Delete the current character.

Abort commands Ctrl + C Abort current interactive commands, such as


when entering multiple lines. If you are not
currently within an interactive command such as
config or edit, this closes the CLI connection.

Continue to next line \ then Enter Continue typing a command on the next line for a
multi-line command.
For each line that you want to continue, terminate
it with a backslash ( \ ). To complete the
command line, terminate it by pressing the
spacebar and then the Enter key without an
immediately preceding backslash.

FortiTester 7.2.3 CLI Reference 8


Fortinet Inc.
CLI commands

CLI commands

The following table describes commonly used CLI commands.

Command Description
? Show help information.
get system status Get system status.
get interface firmware Get interface firmware version.
show system hostname Show hostname configuration.
show system interface Show network interfaces and configurations.
show system memsize Show total memory size.
show system route Show the default route.
show system setting Show network interfaces and configurations.
config system hostname Set the host name for this appliance.
config system interface Configure network interfaces.
config system interface

edit mgmt
set ip 172.173.1.200 255.255.255.0
end

end

config system route Configure the gateway address for the management port.
config system route
set gateway 172.173.1.248
end

config system setting Configure system setting.


config system web-service Configure GUI access redirect HTTPS from HTTP.
diagnose hardware info Show hardware information.
diagnose system disk attributes Show all disk attributes.
diagnose system disk errors Show all disk errors.
diagnose system disk health Show disk health.
diagnose system disk info Show all disk info.
diagnose weighttype setting Configure weight type for iMIX object. The default disabled is
disable/enable flow. Enable is bandwidth.
execute date Set the system date and system time. The format is

FortiTester 7.2.3 CLI Reference 9


Fortinet Inc.
CLI commands

Command Description

MM/DD/YYYY hh:mm:ss.
execute ping Execute a PING command.
execute reboot Reboot the system.
execute shutdown Shut down the system.
execute factoryreset Reset the system into an initial state. Note this operation will
clear all existing data/configuration.
execute formatlogdisk Execute a format disk command for log storage.
execute restore image tftp Upgrade image from tftp server. The format is "execute restore
image tftp xxx.xxx x.x.x.x".
execute restore vmlicense tftp Update VM platform license from tftp server. The format is
"execute restore vmlicense tftp xxx.xxx x.x.x.x".
execute restore config tftp Execute restore config tftp. The format is "execute restore
config tftp xxx.xxx x.x.x.x".
execute backup config tftp Execute backup config tftp. The format is "execute backup
config tftp xxx.xxx x.x.x.x".
exit Exit the current session.

FortiTester 7.2.3 CLI Reference 10


Fortinet Inc.
www.fortinet.com

Copyright© 2023 Fortinet, Inc. All rights reserved. Fortinet®, FortiGate®, FortiCare® and FortiGuard®, and certain other marks are registered trademarks of Fortinet, Inc., and other Fortinet names herein
may also be registered and/or common law trademarks of Fortinet. All other product or company names may be trademarks of their respective owners. Performance and other metrics contained herein were
attained in internal lab tests under ideal conditions, and actual performance and other results may vary. Network variables, different network environments and other conditions may affect performance
results. Nothing herein represents any binding commitment by Fortinet, and Fortinet disclaims all warranties, whether express or implied, except to the extent Fortinet enters a binding written contract,
signed by Fortinet’s General Counsel, with a purchaser that expressly warrants that the identified product will perform according to certain expressly-identified performance metrics and, in such event, only
the specific performance metrics expressly identified in such binding written contract shall be binding on Fortinet. For absolute clarity, any such warranty will be limited to performance in the same ideal
conditions as in Fortinet’s internal lab tests. Fortinet disclaims in full any covenants, representations, and guarantees pursuant hereto, whether express or implied. Fortinet reserves the right to change,
modify, transfer, or otherwise revise this publication without notice, and the most current version of the publication shall be applicable.

You might also like