roger.tips
← All Tips
πŸ’»Mac⚑Productivity 1 min read

caffeinate: Keep Your Mac Awake via Terminal

TL;DR
Prevent your Mac from sleeping β€” without changing system settings. Perfect for downloads, backups, or long-running scripts.

caffeinate: Keep Your Mac Awake via Terminal

How It Works

  1. Open Terminal (Cmd+Space β†’ type "Terminal")
  2. Enter command: caffeinate and press Enter
  3. Your Mac won't sleep anymore (display can still turn off, but system stays active)
  4. Stop it: Press Ctrl+C in Terminal

Variants:

  • caffeinate -d β†’ display stays on too
  • caffeinate -t 3600 β†’ for 1 hour (3600 seconds)
  • caffeinate -w <PID> β†’ until a specific process finishes

Why This Helps

caffeinate is a macOS tool that temporarily overrides Power Management. Useful for:

  • Downloads (overnight)
  • Backups (TimeMachine, Cloud)
  • Long scripts (automation, development)
  • Presentations (display on, no screensaver interruptions)

Note: The Terminal window must stay open. You can run it in the background: caffeinate &

⚠️ Important: Don't forget to stop caffeinate β€” otherwise your Mac will never sleep!

Nerd Bonus: The name is a play on caffeine (coffee keeps you awake). β˜•

Was this helpful?

Be the first to rate this tip!


WhatsApp