I grew up loving the shutdown timer feature on my TV. With the ridiculous amounts of television I consumed, I often struggled to doze off unless I had the noise of some late-night show in the background. Things haven’t changed much since then: I still keep a season or two of The Office, Rick and Morty, or The Sopranos on Google Drive to put me to sleep. But recently I’ve started watching Twitch streamers when I hit the sheets, and unlike a standard episode, these people can go for hours, which means my laptop will stay on for hours. At one point, it becomes more of a sleep disturbance than a sleep aid — so much so that I started missing the good ol’ shutdown timer. Unfortunately, Macs don’t come with a built-in shutdown timer app. There’s the Schedule feature from Energy Saver, but I personally find it pretty annoying to use. Don’t worry, though — there’s an easy way to set one up:

Open Terminal. Once in Terminal, use the following command: sudo shutdown -s +60 With this command, your Mac will go to sleep after 60 minutes. If you want to shut it down completely, simply replace “-s” with “-h.” If you want to restart it, use “-r.” Needless to say, you can adjust the timer by replacing the number at the end. So if you want a 30-minute timer, simply type “+30.” If successfully set up, Terminal will display a message notifying you of the exact time when your Mac is set to shut down.

If you need to disable a shutdown timer, you can use the following command line:

sudo killall shutdown

That’s it!

How to set a shutdown timer for your Mac - 32