FortiTester-7 2 3-CLIReference
FortiTester-7 2 3-CLIReference
FortiTester 7.2.3
FORTINET DOCUMENT LIBRARY
https://docs.fortinet.com
FORTINET BLOG
https://blog.fortinet.com
NSE INSTITUTE
https://training.fortinet.com
FORTIGUARD CENTER
https://www.fortiguard.com
FEEDBACK
Email: [email protected]
Change log 4
Overview 5
Getting CLI help 6
Abbreviating commands 7
Completing commands automatically 7
CLI commands 9
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.
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.
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.
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:
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.
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.
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
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.
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.