Skip to content

Comment on Decapitating a MacBook (2025)parent

Comments

There is a setting for it, it's just not exposed in the GUI.

sudo pmset -a disablesleep 1

As mentioned by the other commenter, `caffeinate -s` also works, but with the caveat that a) the command has to be running and b) the laptop has to be plugged in to power. Configuring disablesleep=1 completely prevents sleep and lasts until you manually configure it back to 0.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.