nvram
— display or
modify contents of the EEPROM or NVRAM
nvram |
[-d name]
...
[name=value ...] |
The nvram
utility provides an interface
for displaying and changing the system's configuration variables contained
in EEPROM or NVRAM. In the first synopsis form, all available configuration
variables and their current values are printed. In the second form, the
variable selected by name is either removed or its
value is changed to the value following by
‘=
’ sign.
The following options are available:
-d
name
- Delete the variable selected by name from the EEPROM
or NVRAM. The
-d
flag can be specified multiple
times, in which case multiple variables will be removed.
-p
- Print all available configuration variables and their current values.
Print all available configuration variables and their current
values:
nvram -p
Remove the variable named
local-mac-address?:
nvram -d
local-mac-address\?
Set the value of the local-mac-address?
variable to “true
”:
nvram
local-mac-address\?=true
Note that the ‘\
’ in the
above examples is used to keep the shell from interpreting the
‘?
’.
Remove variables named foo and
bar and set variable named baz
to “100
”:
nvram -d foo -d bar
baz=100
The nvram
utility first appeared in
FreeBSD 7.0. It is inspired by the Darwin/Mac OS X
nvram
utility.