EFIVAR(8)
π efivar(8) β UEFI environment variable interaction π
okay so welcome to the System Manager's Manual, bestie, and specifically to efivar(8) β the page for the program that manages βUnified Extensible Firmware Interfaceβ (UEFI) environment variables. Firmware admin but make it fashion, honestly. β¨
πΈ NAME πΈ
efivar β UEFI environment variable interaction. Short, iconic, to the point. π
π¦ SYNOPSIS π¦
the whole flag parade, verbatim:
efivar [-abdDHlLNpqRtuw] [-n name] [-f file] [--append] [--ascii]
[--attributes] [--binary] [--delete] [--device-path]
[--fromfile file] [--guid] [--hex] [--list-guids] [--list]
[--load-option] [--name name] [--no-name] [--print]
[--print-decimal] [--quiet] [--raw-guid] [--utf8] [--write]
π DESCRIPTION π
This program manages βUnified Extensible Firmware Interfaceβ (UEFI) environment variables, and no cap, UEFI variables have three parts: a namespace, a name, and a value. π
- The namespace is a GUID that is self assigned by the group defining the variables.
- The name is a Unicode name for the variable.
- The value is binary data.
All Unicode data is presented to the user as UTF-8. β¨
The following options are available:
π the options, one by one π
-n_name_,--name_name_ β specify the name of the variable to operate on. The _name_ argument is the GUID of the variable, followed by a dash, followed by the UEFI variable name. The GUID may be in numeric format, or may be one of the well known symbolic names (see--list-guidsfor a complete list). π«Ά-f_file_,--fromfile_file_ β when writing or appending to a variable, take the data for the variable's value from _file_ instead of from the command line. This flag implies--writeunless the--appendor--printflags are given. This behavior is not well understood and is currently unimplemented for writes. When--printis specified, the contents of the file are used as the value to print using any other specified flags. This is used primarily for testing purposes for more complicated variable decoding. π-a,--appendβ append the specified value to the UEFI variable rather than replacing it. β¨-t_attr_,--attributes_attr_ β specify, in hexadecimal, the attributes for this variable. See section 7.2 (GetVariable subsection, Related Definitions) of the UEFI Specification for hex values to use. π₯-A,--asciiβ display the variable data as modified ASCII: All printable characters are printed, while unprintable characters are rendered as a two-digit hexadecimal number preceded by a%character. π-b,--binaryβ display the variable data as binary data. Usually will be used with the-Nor--no-nameflag. Useful in scripts. π§-D,--deleteβ delete the specified variable. May not be used with either the--writeor the--appendflags. No value may be specified. π¨-d,--device,--device-pathβ interpret the variables printed as UEFI device paths and print the UEFI standard string representation. π¦-g,--guidβ convert GUIDs to names if they are known (and show them in--list-guids). π-H,--hexβ list variable data as a hex dump. β-L,--list-guidsβ lists the well known GUIDs. The names listed here may be used in place of the numeric GUID values. These names will replace the numeric GUID values unless the--raw-guidflag is specified. π-l,--listβ list all the variables. If the--printflag is also listed, their values will be displayed. π--load-optionβ decode the variable as if it were a UEFI Boot Option, including information about what device and/or paths the UEFI DevicePaths decode to. π₯-N,--no-nameβ do not display the variable name. π-p,--printβ print the value of the variable. π-q,--quietβ when an error occurs, exit with a non-zero value without outputting any error messages. Otherwise, produce the normal output and exit with a zero status. π€«-R,--raw-guidβ do not substitute well known names for GUID numeric values in output. π-u,--utf8β treat the value of the variable as UCS2 and convert it to UTF8 and print the result. πΈ-w,--writeβ write (replace) the variable specified with the value specified from standard input. No command line option to do this is available since UEFI variables are binary structures rather than strings.echo(1) -ncan be used to specify simple strings. β¨nameβ display thenameenvironment variable. (That's literally what the page says, bestie. I don't make the rules. π« )
π₯ COMPATIBILITY π₯
The efivar program is intended to be compatible (strict superset) with a program of the same name included in the Red Hat libefivar package, but the -d and --print-decimal flags are not implemented and never will be. π
The -d flag is short for --device-path. Yes, both lines are here, and yes, that's the page's business, not mine. π
π§ SEE ALSO π§
Appendix A of the UEFI specification has the format for GUIDs. All GUIDs βGlobally Unique Identifiersβ have the format described in RFC 4122. Go read the lore if you want the full backstory, bestie. π
β HISTORY β
The efivar utility first appeared in FreeBSD 11.1. A whole era ago, honestly. π°οΈ
Debian Β· April 7, 2021 β that's the source/version and date from the footer, bestie. Bye, love u, go check your UEFI variables responsibly π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2017-2021 Netflix, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms