---
name: "fw_setenv"
section: "8"
platform: "linux"
package: "libubootenv-tool"
version: "0.3.5-0.1+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/fw_setenv"
---

# fw\_setenv(8)

Tool for modifying the environment for the bootloader U-Boot

## NAME

fw\_setenv - Tool for modifying the environment for the bootloader U-Boot

## SYNOPSIS

fw\_setenv *name* \[ *value* \]

## DESCRIPTION

fw\_setenv is a simple tool for modifying the environment for the bootloader U-Boot. The variable *name* is updated to hold *value* if it is already set in the environment, else it is created and set. If only the *name* argument is given, the corresponding variable is deleted. This version of fw\_printenv stems from libubootenv and does not hold a built-in default environment. Instead, the default environment is read from a file.

## OPTIONS

- **-h**

  print a help message

- **-c, --config \<filename\>**

  configuration file (old fw\_env.config)

- **-f, --defenv \<filename\>**

  default environment if no one found

- **-V**

  print program's version

- **-s, --script \<filename\>**

  read variables to be set from a script

## FILES

- **/etc/fw\_env.config**

  Configuration file for fw\_setenv. Default value of the --config option.

- **/etc/u-boot-initial-env**

  Default U-Boot environment. Default value of the --defenv option.

## SEE ALSO

[fw\_printenv(8)](/fw_printenv/8.md)
