caffeinate
Prevent macOS from sleeping. More information: https://ss64.com/osx/caffeinate.html.
-
Prevent from sleeping for 1 hour (3600 seconds):
caffeinate -u -t {{3600}}
-
Prevent from sleeping until a command completes:
caffeinate -s "{{command}}"
-
Prevent from sleeping (use
Ctrl + C
to exit):
caffeinate -i
-
Prevent disk from sleeping (use
Ctrl + C
to exit):
caffeinate -m
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.