OS X - Turn off sleep from the command line
Published: 03-06-2013 | Author: Remy van Elst | Text only version of this article
❗ This post is over eight years old. It may no longer be up to date. Opinions may have changed.
This little snippet turns off Sleep on an OS X machine, either iMac or Macbook. Normally when a Mac is not used it goes in sleep mode, this turns that off.
Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.
You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60 days.
To turn off sleep mode:
systemsetup -setsleep Off
Or to set an other time (5 minutes for example):
Tags: apple , apple-remote-desktop , ard , mac , os-x , power-saving , sleep , snippets
systemsetup -setsleep 5