Tag Archives: Darwin

How to disable the ultra annoying Startup Sound on Mac OS X


I passionately *H*A*T*E* the startup chime that my Mac makes when I switch it on. At least on my MacBook, if the volume is turned down before I shutdown, the system restarts silently. I guess it’s somehow linked to the internal speakers.

Sadly on my Mac Mini this approach doesn’t work: due to the lack of “real” internal speakers , the Mini always wakes up with that horrible eighties K-DONNNNNNNNG noise, waking up my wife and large parts of the neighbourhood.

But there’s good news: thanks to the nvram command we can set a firmware value to suppress this sound. Here’s how:

This will write a value of 128 (or 80 in hex) to the BIOS. Make sure to shutdown your system and then power back on to “hear” the effect on a Mac Mini: simply restarting it will not suppress the sound, but a full shutdown and restart will do the trick from now on. Result!

As much as I dislike the sound, it is there for a reason: it signals the successful completion of a quick self test. I appreciate this – so I may not want to switch K-DONNNNNNNNG off forever.

It’s easy to remove that value again from the BIOS, using the -d parameter of the same command:

There. Now the horror chime is enabled again, ready to annoy more neighbours at 3am.

Kudos to the following sources:

How to prevent your MacBook from sleeping when you close the lid

Screen Shot 2015-03-14 at 17.27.37

There’s a built-in command line tool in every Mac called caffeinate that prevents your computer from going to sleep, even when the lid is closed. This is the default behaviour if an external monitor is attached, but if that’s not the case, MacBooks just go to sleep as soon as you close the lid.

While several GUI tools are available (such as InsomniaX, or the Nosleep Extension, you can also call caffeinate from the command line without installing anything.

Open the Terminal app (under Applications – Utilities), and simply type

The cursor will disappear and your Mac won’t go to sleep. To terminate the behaviour, simply press CTRL+C – just like you would to stop any other shell command.

You can stop the command and close the Terminal session as soon as your lid is closed (and stays closed). If you open and close your lid again, your Mac will get sleepy again.

The command has a lot to offer, for example you could ask the hard disks from not sleeping using caffeinate -m, or prevent the display from going blank with caffeinate -d.

You can also specify a timeout using

This specifies the time in seconds you would like caffeinate to stay active (after 3600 seconds, or one hour, your Mac will sleep again).

Checkout man caffeinated from the command line for more options.

How to show uptime and reboot history on your Mac the command line

Hexley_the_Platypus.svgUsually the top command shows you how long a Linux system is up and running – but sadly not on OS X, or Darwin more specifically.

There is however a command line tool with the descriptive name uptime which will tell you how long your Mac has been running, precisely the line that’s missing from top on OS X:

If you have the OS X Server App installed, it will show you this value in the GUI on the Overview screen too.

Reboot History

Sometimes it’s also nice to know when your Mac was last rebooted, especially if it’s a remote system you don’t often get to talk to. There’s another handy command which will show you just that: last reboot:

Further reading and kudos: