NVRAM(8) | System Manager's Manual | NVRAM(8) |
nvram
— manipulate
firmware NVRAM variables
nvram |
[-x ] [-p ]
[-f filename]
[-d name]
[-c ] [name [=
value [...]]] |
The nvram
command allows manipulation of
firmware NVRAM variables. It can be used to get or set a variable. It can
also be used to print all of the variables or set a list of variables from a
file. Changes to NVRAM variables are only saved by clean restart or
shutdown.
In principle, name can be any string. In practice, not all strings will be accepted. Some variables require administrator privilege to get or set.
The given value must match the data type required for name. Binary data can be set using the %xx notation, where xx is the hex value of the byte. The type for new variables is always binary data.
-d
name-r
name-f
filename-x
-p
or -f
options, since arguments are processed in order.-c
-p
example% nvram boot-args="-s rd=*hd:10"
Set the boot-args variable to "-s rd=*hd:10". This would specify single user mode with the root device in hard drive partition 10.
example% nvram my-variable="String One%00String Two%00%00"
Create a new variable, my-variable, containing a list of two C-strings that is terminated by a NUL.
example% nvram -d my-variable
Deletes the variable named my-variable.
January 25, 2021 | macOS |