Skip to content

nvram MacOS Command Guide

The MacOS nvram command allows users to interact with the system’s Non-Volatile Random-Access Memory (NVRAM) variables. NVRAM is a small amount of memory that stores system settings even when the computer is turned off. With the nvram command, you can view, set, and delete these variables, which can be useful for troubleshooting system issues, changing startup disk preferences, or modifying system configurations. By using the nvram command in the Terminal, you can access and manipulate these NVRAM variables to customize your MacOS operating system.

Terminal window
nvram [options] [parameters]
OptionDescription
-cClear all settings in NVRAM
-dDelete a variable from NVRAM
-pPrint all variables in NVRAM
-xPrint all variables in XML format
ParameterDescription
variableName of the variable to delete or view
name=valueSet the value of the specified variable
Terminal window
nvram -p

This command displays all NVRAM variables currently set on the system.

Terminal window
nvram my_variable="example value"

This command sets a specific NVRAM variable with the value “example value”.

Terminal window
nvram -d my_variable

This command deletes a specific NVRAM variable named “my_variable”.

Terminal window
nvram -c

This command resets the NVRAM to its default settings.

Terminal window
nvram my_variable

This command displays the value of a specific NVRAM variable named “my_variable”.

Terminal window
nvram -c

This command clears all NVRAM variables currently set on the system.

Terminal window
nvram -x

This command enables verbose mode for NVRAM operation, providing more detailed information.

How can I display all the NVRAM variables set in MacOS?

Section titled “How can I display all the NVRAM variables set in MacOS?”

To display all the NVRAM variables set in MacOS, you can use the following command:

Terminal window
nvram -p

How do I set a new variable with a value using nvram in MacOS?

Section titled “How do I set a new variable with a value using nvram in MacOS?”

To set a new variable with a value using nvram in MacOS, you can execute the following command:

Terminal window
sudo nvram my_variable="my_value"

How can I delete a specific NVRAM variable in MacOS using nvram?

Section titled “How can I delete a specific NVRAM variable in MacOS using nvram?”

To delete a specific NVRAM variable in MacOS using nvram, you can run the following command:

Terminal window
sudo nvram -d my_variable

How can I reset the entire NVRAM to default values in MacOS?

Section titled “How can I reset the entire NVRAM to default values in MacOS?”

To reset the entire NVRAM to default values in MacOS, you can use the following command:

Terminal window
sudo nvram -c

How do I set the boot-args variable in MacOS using nvram?

Section titled “How do I set the boot-args variable in MacOS using nvram?”

To set the boot-args variable in MacOS using nvram, you can run the following command:

Terminal window
sudo nvram boot-args="-v"

How can I enable verbose mode during boot using nvram in MacOS?

Section titled “How can I enable verbose mode during boot using nvram in MacOS?”

To enable verbose mode during boot using nvram in MacOS, enter the following command:

Terminal window
sudo nvram boot-args="-v"
  • Storing non-volatile random-access memory variables.
  • Reading firmware variables.
  • Setting firmware variables.
  • Inspecting firmware variables.
  • Modifying firmware variables.
  • Resetting firmware variables to default values.