Keep Your Mac Awake with caffeinate
caffeinate holds sleep off while a command runs, or for a fixed number of seconds.
01Command
$ caffeinate -d -t 360002What it does
caffeinate creates a power assertion — the same mechanism that keeps a Mac awake during a system update. The flags target different sleep types: -d keeps the screen on, -i blocks idle system sleep, -m guards disk sleep, and -s keeps the whole system awake on desktops. With a command after the flags, the Mac stays awake until that command finishes, which is ideal for `caffeinate -i rsync …` style jobs. When the command exits or the timer ends, normal sleep rules resume — nothing is changed permanently.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- caffeinate — prevent sleep (macOS man page)Evidence: Documents flags -d (display), -i (system idle), -m (disk), -s (system) and -t seconds for a timed assertion.
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
List every power assertion — the named reason an app, audio stream, or screen share blocks sleep.
Point macOS screen captures at any folder you choose instead of the desktop.
Grab any file from the web straight into the current folder — no browser needed.