---
name: "bg_setenv"
section: "1"
platform: "linux"
package: "efibootguard"
version: "0.19-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bg_setenv"
---

# bg\_setenv(1)

bg\_setenv

## NAME

EFI - bg\_setenv

## SYNOPSIS

**bg\_setenv** \[*OPTION*...\]

## DESCRIPTION

bg\_setenv - Environment tool for the EFI Boot Guard

- **-a**, **--args**=*KERNEL\_ARGS*

  Set kernel arguments

- **-A**, **--all**

  search on all devices instead of root device only

- **-c**, **--confirm**

  Confirm working environment

- **-f**, **--filepath**=*ENVFILE*

  Environment to use. Expects a file name, usually called BGENV.DAT.

- **-i**, **--in\_progress**=*IN\_PROGRESS*

  Set in\_progress variable to simulate a running update process.

- **-k**, **--kernel**=*KERNEL*

  Set kernel to load

- **-p**, **--part**=*ENV\_PART*

  Set environment partition to use. If no partition is specified, the one with the smallest revision value above zero is selected.

- **-P**, **--preserve**

  Preserve existing entries

- **-r**, **--revision**=*REVISION*

  Set revision value

- **-s**, **--ustate**=*USTATE*

  Set update status for environment

- **-u**, **--update**

  Automatically update oldest revision

- **-v**, **--verbose**

  Be verbose

- **-w**, **--watchdog**=*WATCHDOG\_TIMEOUT*

  Watchdog timeout in seconds

- **-x**, **--uservar**=*KEY=VAL*

  Set user-defined string variable. For setting multiple variables, use this option multiple times.

- \-?, **--help**

  Give this help list

- **--usage**

  Give a short usage message

- **-V**, **--version**

  Print version

Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.
