Skip to content

How to keep your Mac awake

The short answer

To stop your Mac sleeping for good, set the display to stay on longer in System Settings › Lock Screen and turn on Prevent automatic sleeping in Battery › Options on a laptop or Energy on a desktop. To keep it awake just for now, run caffeinate in Terminal, or use a Keep Awake switch in the menu bar such as ZincWolf MenuBar’s.

Stop your Mac sleeping in System Settings

Two settings decide when a Mac rests: when its display turns off, and whether the Mac itself sleeps once the display is off. On macOS 14 Sonoma to macOS 26 Tahoe, they’re in two places.

  1. Open System Settings and click Lock Screen in the sidebar.
  2. On a laptop, set Turn display off on power adapter when inactive to a longer time or Never. There’s a separate menu for when it’s on battery. On a desktop Mac there’s one menu for when the display turns off.
  3. On a laptop, click Battery, then Options, and turn on Prevent automatic sleeping on power adapter when the display is off.
  4. On a desktop Mac, click Energy and turn on Prevent automatic sleeping when the display is off.

On macOS 14 Sonoma, a desktop Mac’s setting is under Energy Saver instead of Energy. Apple has the details in Set sleep and wake settings for your Mac.

These settings stay until you change them back, and a Mac that never sleeps uses more power. On a laptop the sleep setting applies only while it’s plugged in: on battery it still sleeps as usual.

Keep it awake for now with caffeinate

Often you only want your Mac to stay awake for a while: through a long download, a presentation or a render. Terminal has a command for that called caffeinate, and it changes no settings.

  1. Press ⌘Space, type Terminal and press Return.
  2. Type caffeinate -d and press Return. Your Mac and its display now stay awake.
  3. When you’re done, press ⌃C in that Terminal window, or close it. Your Mac goes back to its usual sleep settings.
  • -d keeps the display on, and so the Mac stays awake too.
  • -i keeps the Mac from sleeping when it’s idle, but lets the display turn off. It’s the one for downloads and renders.
  • -t stops after a number of seconds: caffeinate -d -t 3600 keeps your Mac awake for one hour, then ends by itself.

Put a command after caffeinate -i, and your Mac stays awake until that command finishes.

Can a MacBook stay awake with the lid closed?

Closing a MacBook’s lid puts it to sleep, whatever your settings say and even with caffeinate running. That’s macOS’s rule, and no app can lift it.

The one exception is closed-display mode: with the MacBook connected to power and to an external display, plus an external keyboard and mouse or trackpad, it keeps running with the lid closed and uses the external display as its screen.

Terminal works, but it’s easy to forget the window is open, and changing System Settings back and forth gets tedious. A switch in the menu bar is quicker. ZincWolf MenuBar’s Keep Awake module is a cup in your menu bar: click it to keep your Mac awake, and click it again to let it sleep.

  • One click, no settings changed: your sleep settings stay as they are, and come back into play the moment you turn Keep Awake off.
  • Shared across ZincWolf apps: ZincWolf Dock and ZincWolf Island have Keep Awake too, and it’s the same switch in all of them. Turn it on in one and it’s on in the others, on your Mac only.
  • A choice in ZincWolf Island: its Keep Awake keeps your Mac, or just the Mac and not its display, awake for a while.
  • More in the same menu bar: ZincWolf MenuBar has 33 modules in all, from CPU and memory to timers, a calendar and a stopwatch. Overview, CPU and Memory start on, and you turn on whichever others you want.

Questions

How do I stop my Mac from going to sleep?
Open System Settings › Lock Screen and set the display to turn off later or never, then turn on Prevent automatic sleeping in Battery › Options on a laptop, or in Energy on a desktop Mac.
How do I keep my Mac awake without changing settings?
Open Terminal and run caffeinate -d. Your Mac stays awake until you press Control-C or close the window. A menu bar switch such as ZincWolf MenuBar’s Keep Awake does the same with one click.
Will my MacBook stay awake with the lid closed?
No, closing the lid puts it to sleep. The exception is closed-display mode, which needs the MacBook connected to power and an external display, with an external keyboard and mouse or trackpad.
Does keeping my Mac awake use more battery?
Yes. A Mac that stays awake, and especially one whose display stays on, uses more power than one that sleeps, so turn it off when you no longer need it.

Your Privacy Choices

Choose what zincwolf.app may use. You can change this at any time from the link at the bottom of every page. Our Privacy Policy lists every cookie.