Prevent your Mac from Sleeping using simple Terminal Command

Terminal

There are a lot of applications that you can use/install to prevent your mac from sleeping such as Caffeine, Jiggler, or InsomniaX. But what if you’re too lazy to install those applications in your Mac, but still wanted to prevent your Mac from sleeping?

Well, the answer is by using a simple Terminal Command Wink.png . To do this, open the Terminal (Applications > Utilities > Terminal) and enter the following command:

pmset noidle

That’s it Hot.png your Mac will not sleep so long as you do not close the Terminal. To enable your Mac to sleep again, simply hit Control + C or close the Terminal.

  • Those little software are ok I think, but I still prefer doing this kind of things by myself. It’s just more clear and makes your heart fell much better than giving sudo powers to unknown apps. Thanks.

    • No Problemo 😀

      I don’t like installing 3rd party apps either, especially when you can just use this simple Terminal command. Might as well create an applescript to make it easier ._.

  • Semaja2

    It should be pointed out that InsomniaX primary purpose is not to disable idle sleep but to disable lid sleep which can only be achieved with a kext

    • Yeah, you’re right… But still, you can use InsomniaX to prevent your mac from sleeping not just to disable lid sleep.

Search