How to keep your Mac from going to sleep

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:

  1. Open System Settings from the Apple menu, then click Lock Screen in the sidebar.
  2. Set “Turn display off on battery when inactive” to Never.
  3. 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

  1. In System Settings, click Battery in the sidebar.
  2. Click Options…
  3. 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:

  1. Open System Preferences and click Battery (or Energy Saver on older Macs).
  2. Drag the “Turn display off after” slider to Never.
  3. 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.

  1. Open Terminal (find it fast with our guide to opening the installed apps list in macOS 26, or via Spotlight).
  2. Type caffeinate and press Return. Your Mac now stays awake until you press Control+C.
  3. For a timed session, use caffeinate -t 3600 — that is one hour (3,600 seconds), then it releases automatically.
  4. Use flags for finer control: -d prevents the display from sleeping, -i prevents idle system sleep, and -s keeps 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.

shamsigai
We will be happy to hear your thoughts

Leave a reply

About CompareWala

CompareWala helps you compare prices, features, and reviews across top online stores — so you never overpay again. We track products on Amazon, AliExpress, and more, bringing every deal together in one place.

Get in Touch

Questions, suggestions, or partnership inquiries? We would love to hear from you.

Email: [email protected]

© 2026 CompareWala. All rights reserved. Prices shown are from third-party stores and may change.