FortiOS 5.4 Online Help Link FortiOS 5.2 Online Help Link FortiOS 5.0 Online Help Link FortiOS 4.3 Online Help Link

Home > Online Help

> Chapter 23 - System Administration > Firmware > Upgrading the firmware - CLI

Upgrading the firmware - CLI

Installing firmware replaces your current antivirus and attack definitions, along with the definitions included with the firmware release you are installing. After you install new firmware, make sure that antivirus and attack definitions are up to date. You can also use the CLI command execute update-now to update the antivirus and attack definitions. For more information, see the System Administration handbook.

Before you begin, ensure you have a TFTP server running and accessible to the FortiGate unit.

Always remember to back up your configuration before making any changes to the firmware.
To upgrade the firmware using the CLI
  1. Make sure the TFTP server is running.
  2. Copy the new firmware image file to the root directory of the TFTP server.
  3. Log into the CLI.
  4. Make sure the FortiGate unit can connect to the TFTP server.

    You can use the following command to ping the computer running the TFTP server. For example, if the IP address of the TFTP server is

execute ping


  1. Enter the following command to copy the firmware image from the TFTP server to the FortiGate unit:

execute restore image tftp <filename> <tftp_ipv4>


Where <name_str> is the name of the firmware image file and <tftp_ip4> is the IP address of the TFTP server. For example, if the firmware image file name is image.out and the IP address of the TFTP server is, enter:

execute restore image tftp image.out

The FortiGate unit responds with the message:

This operation will replace the current firmware version!
Do you want to continue? (y/n)


  1. Type y.
  2. The FortiGate unit uploads the firmware image file, upgrades to the new firmware version, and restarts. This process takes a few minutes.
  3. Reconnect to the CLI.
  4. Update antivirus and attack definitions, by entering:

execute update-now