Set Your Mac’s Sleep Time With A Terminal Command

Set Your Mac’s Sleep Time With A Terminal Command
To sign up for our daily newsletter covering the latest news, hacks and reviews, head HERE. For a running feed of all our stories, follow us on Twitter HERE. Or you can bookmark the Lifehacker Australia homepage to visit whenever you need a fix.

Mac: Terminal commands are great for managing a remote computer, writing scripts or Automating your computer. Here’s a handy terminal command that lets you set a delay for sleep and overrides system preferences.

It’s not hard to change your system preferences for sleep if you’re in front of a computer. But if, for example, you are giving a presentation, you can put this command in the workflow. To set the timer to 60 minutes, the command is:

sudo systemsetup -setcomputersleep 60

If you want the computer to not go to sleep, put NEVER at the end of the command:

sudo systemsetup -setcomputersleep Never

Set or Disable Sleep Due to Mac System Inactivity from the Command Line in OS X [OS X Daily]