Your Mac loves a good nap. Leave it alone for a few minutes and it dims the display, spins down, and drifts into sleep — pausing downloads, stalling uploads, and cutting off remote access. That is great for battery life, but not when you are in the middle of something important.
Whether you are rendering a video, running an overnight download, giving a presentation, or working from your iPhone’s hotspot connection, here is how to keep your Mac awake — both through Settings and with a handy Terminal trick.
Stop the display from sleeping (macOS Ventura and later)
On modern macOS, the main controls live in System Settings:
- Open System Settings from the Apple menu, then click Lock Screen in the sidebar.
- Set “Turn display off on battery when inactive” to Never.
- Set “Turn display off on power adapter when inactive” to Never.
This keeps the screen on, which in most cases also keeps the Mac itself from sleeping. But for full insurance while plugged in, there is one more toggle.
Prevent automatic sleep on the power adapter
- In System Settings, click Battery in the sidebar.
- Click Options…
- Turn on “Prevent automatic sleeping on power adapter when the display is off.”
With this enabled, your Mac stays fully awake on AC power even if the display goes dark — perfect for long downloads or server-style duties. Apple’s Mac support pages document these settings in detail.
On older Macs (macOS Monterey and earlier)
If your Mac runs Monterey or older, the settings live in System Preferences instead:
- Open System Preferences and click Battery (or Energy Saver on older Macs).
- Drag the “Turn display off after” slider to Never.
- Check “Prevent computer from sleeping automatically when the display is off.”
Keep your Mac awake temporarily with caffeinate
Do not want to change system settings? The built-in caffeinate command keeps your Mac awake for as long as you need — no settings changed, no reboot required.
- Open Terminal (find it fast with our guide to opening the installed apps list in macOS 26, or via Spotlight).
- Type
caffeinateand press Return. Your Mac now stays awake until you press Control+C. - For a timed session, use
caffeinate -t 3600— that is one hour (3,600 seconds), then it releases automatically. - Use flags for finer control:
-dprevents the display from sleeping,-iprevents idle system sleep, and-skeeps the whole system awake on AC power.
This is the perfect tool for presentations and long file transfers — MacRumors and 9to5Mac have both highlighted it as an essential Mac power-user trick.
If it still doesn’t work
Closing the lid always puts a MacBook to sleep — the settings above cannot override that. The exception is clamshell mode: with an external display, the power adapter, and an external keyboard and mouse connected, you can close the lid and keep working. Also check Battery → Options for a sleep schedule, which can override everything else.
Frequently asked questions
Will keeping my Mac awake damage the battery?
On the power adapter, no — the Mac is designed to run indefinitely on AC power. On battery, “Never” will drain it much faster and the Mac will run warmer, so only use it on battery when you genuinely need it.
Does the caffeinate command work on Apple Silicon Macs?
Yes. caffeinate is part of macOS itself and works identically on Apple Silicon and Intel Macs.
Conclusion
For a permanent fix, set your Lock Screen and Battery options to Never; for one-off sessions, caffeinate is unbeatable. Either way, your Mac will stay awake exactly as long as you need it to — no more interrupted downloads.