Keep your Mac awake for a while with caffeinate — via SS64
Need your Mac to stay awake during a long download, render or presentation without changing your sleep settings? The built-in caffeinate command holds sleep off for as long as you say, then everything goes back to normal on its own.
Takes effect right away
The easy way
- The example keeps the display (
-d) and the system (-i) awake for one hour (-t 3600seconds). - Run plain
caffeinateto stay awake until you press Control + C or close the Terminal window. - To stay awake only while a job runs, put it after the command, for example
caffeinate -i ./backup.sh.
Command
Run in Terminal (Applications › Utilities).
caffeinate -d -i -t 3600Sources
- caffeinate — by SS64
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me
Oddbyte.Me hasn't tried this on every macOS version, so keep the undo handy.