Technical Tip: How to get the serial number via CLI and GUI
| Description | This article describes how to obtain the device's serial number from CLI and GUI. |
| Scope | FortiGate, FortiMail, FortiProxy, FortiAnalyzer, FortiManager. |
| Solution | To obtain the serial number of FortiGate from the GUI, go under Dashboard -> Status -> System Information -> Serial number
For any purpose, it could be necessary to know the serial number of a device via CLI.
If the command 'get system status' is typed, it brings information related to the device, for example: FGT # get system status
However, if the intention is to get only the serial number, avoiding seeing the other information, it is necessary to use the 'grep' command on the 'get system status' outputs.
The following command 'get system status | grep -fi Serial' can be used to search case-insensitively and to mark the found line.
For example:
get system status | grep -fi Serial
Alternatively, the following command can be used if the marker arrow is not wanted.
get system status | grep Serial Serial-Number: FG200ETKxxxxxxxx
In a cluster environment, the serial numbers of all cluster nodes can be seen with the command 'diagnose system ha status'.
Here again, the 'grep' command can be applied to search for the serial numbers by filtering the output for the string 'hostname='.
For example:
diagnose system ha status | grep 'hostname=' FG6H0FTBxxxxxxxx: Secondary, serialno_prio=0, usr_priority=128, hostname=firewall03
In FortiAnalyzer, make sure the system information is checked under Dashboard, toggle 'Widget' to view system information for the Serial number.
Related articles: |

