Saturday, July 26, 2014

How to disable start up sound in MacBook Air

It has puzzled me for a long time, especially at midnight.

$ sudo nvram --help
nvram: (usage: no such option as --)
nvram [-x] [-p] [-f filename] [-d name] [-c] name[=value] ...
-x                       use XML format for printing or reading variables
                          (must appear before -p or -f)
-p                       print all firmware variables
-f                        set firmware variables from a text file
-d                       delete the named variable
-c                       delete all variables
name=value      set named variable
name                 print variable
Note that arguments and options are executed in order.

$ sudo nvram SystemAudioVolume=%80
$ sudo nvram -p | grep SystemAudioVolume

SystemAudioVolume %80