Last Updated: February 25, 2016
·
1.635K
· tobiastom

Disable sleep mode on Mountain Lion

10.8 includes a nice little command line tool to disable the sleep mode for some time:

caffeinate

If you run it without arguments, it will prevent the sleep mode as long as you do not stop it again (ctrl+c).

You can also give a timeout on how long it will run, and the best: you can run a command, during which time the display will not go to sleep:

caffeinate [command] [arguments]