Tool · The caffeinate command (Terminal)
Why caffeinate keeps your Mac awake
caffeinate is the macOS command that keeps a Mac awake on purpose. In pmset -g assertions it appears as “caffeinate command-line tool”, and the assertion type tells you which flag was used: -i keeps the Mac awake, -d keeps the display on too, -s prevents system sleep on power. It stays until the command ends, its timeout runs out, or it’s stopped. Scripts and apps sometimes start it in the background.
Checked on macOS 27.2.1 on a MacBook Pro with Apple silicon, 11 November 2026.
What you’ll see
| Type | Name | Meaning |
|---|---|---|
PreventUserIdleSystemSleep | caffeinate command-line tool | caffeinate -i: the Mac stays awake, the display can sleep. |
PreventUserIdleDisplaySleep | caffeinate command-line tool | caffeinate -d: the display stays on. |
PreventSystemSleep | caffeinate command-line tool | caffeinate -s: system sleep is prevented while on power. |
Check it on your Mac
Open Terminal (in Applications › Utilities) and run:
caffeinate -i -t 4 & pmset -g assertions | grep -A2 caffeinate
Real output from the Mac we checked:
pid 53282(caffeinate): [0x0000648f000193bb] 00:00:01 PreventUserIdleSystemSleep named: "caffeinate command-line tool" Details: caffeinate asserting for 4 secs Localized=THE CAFFEINATE TOOL IS PREVENTING SLEEP.
Activity Monitor shows the same thing without Terminal: open its Energy tab and look at the Preventing Sleep column.
What to do
- If it’s yours, go back to that Terminal window and press Control-C.
- If you don’t know where it came from, run
ps -o pid,ppid,command -p $(pgrep caffeinate)to see its full command line and its parent process. - To stop it,
killall caffeinate. The script that started it may start it again.
See it without Terminal
SleepPilot, a menu bar app, lists every app that is keeping your Mac awake right now by name — audio through coreaudiod is shown under the app that plays it — and warns you when one holds the Mac awake for too long while nobody is using it. Each morning it can show what kept the Mac awake overnight.

Questions
Is it safe to quit caffeinate?
Yes. It’s an ordinary command; stopping it only lets the Mac sleep again.
Is caffeinate keeping my Mac awake normal?
Fine if you started it. If you didn’t, find out what did.
Does caffeinate keep the display on?
Depends on the flag: the Mac, the display, or both.