Created
August 24, 2021 17:51
-
-
Save sajjadintel/e235cc3056f28d58f0ee9a3025943c29 to your computer and use it in GitHub Desktop.
Completely disable sleep on any Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Useful to prevent Macbooks to go to sleep when closing the lid instead of running tools that requires a Kernel Extension (e.g. InsomniaX) and more | |
# Before doing anything, save your current configuration using | |
pmset -g | |
# To disable sleep | |
sudo pmset -a sleep 0; sudo pmset -a hibernatemode 0; sudo pmset -a disablesleep 1; | |
# And to go back to normal | |
sudo pmset -a sleep 1; sudo pmset -a hibernatemode [original hibernatemode value]; sudo pmset -a disablesleep 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment