Chapter 10 Install and System Administration for FortiOS 5.0 : Using the CLI : Tips : Environment variables
  
Environment variables
The CLI supports the following environment variables. Variable names are case-sensitive.
Table 65: Environment variables
$USERFROM
The management access type (ssh, telnet, jsconsole for the CLI Console widget in the web-based manager, and so on) and the IP address of the administrator that configured the item.
$USERNAME
The account name of the administrator that configured the item.
$SerialNum
The serial number of the FortiGate unit.
 
For example, the FortiGate unit’s host name can be set to its serial number.
config system global
set hostname $SerialNum
end
As another example, you could log in as admin1, then configure a restricted secondary administrator account for yourself named admin2, whose first-name is admin1 to indicate that it is another of your accounts:
config system admin
edit admin2
set first-name $USERNAME
See Also
Help
Shortcuts and key commands
Command abbreviation
Special characters
Using grep to filter get and show command output
Language support and regular expressions
Screen paging
Baud rate
Using Perl regular expressions
Connecting to the CLI
Command syntax
Sub-commands
Tips