Skip to content

Keep your Mac awake for a while with caffeinate — via SS64

Commandlow riskmacOS 14 Sonoma and later

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

  1. The example keeps the display (-d) and the system (-i) awake for one hour (-t 3600 seconds).
  2. Run plain caffeinate to stay awake until you press Control + C or close the Terminal window.
  3. 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 3600

Sources

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.

caffeinateprevent sleepstay awaketerminalamphetamine

More in Performance & Power

Check memory pressure, not 'free RAM' — via Apple Support

Tricklow risk

A Mac that shows almost no free memory is usually fine: macOS keeps recently used files cached in RAM so apps reopen faster. The number that matters is the Memory Pressure graph in Activity Monitor, which combines free memory, swap and cached files.