← GuidesPower · 5 min read · November 23, 2026 · by Dom, who makes Desktop Goods

How to keep your Mac awake (without changing your sleep settings)

Stop your Mac sleeping during a download, render or presentation. The free Terminal command, the settings route, and the one-click way.

Your Mac sleeps to save power, which is great until it does it halfway through a 20 GB download, a long export or a presentation. Here’s how to keep it awake for exactly as long as you need, and then let it sleep normally again.

The free way: caffeinate

Every Mac has a built-in command for this. Open Terminal and type:

caffeinate

Your Mac stays awake until you close that Terminal window or press ⌃C. A few useful variations:

Command What it does
caffeinate -d Also keeps the display on
caffeinate -t 3600 Stays awake for 3600 seconds (1 hour), then stops
caffeinate -i -w 1234 Stays awake until the process with ID 1234 quits

It’s free and reliable. The catch is remembering the flags and keeping a Terminal window open.

The settings way (and why it’s usually the wrong one)

You can change when your Mac sleeps in System Settings: under Lock Screen for the display, and under Battery (MacBooks) or Energy (desktop Macs) for sleep itself. On a MacBook, Battery, then Options, has Prevent automatic sleeping on power adapter when the display is off.

That works, but it’s permanent. You’ll forget to switch it back, and your Mac will stay awake every night from then on.

The one-click way

Vigil puts this in your menu bar:

  1. Pick how long: 15 minutes, 1 hour, 3 hours, no limit, or until an app quits (handy for Xcode, Final Cut or a download app).
  2. The time left counts down in the menu bar, and you can add more with one click.
  3. When time’s up, your Mac goes back to its normal sleep settings.

Choose whether to keep the display on (presentations) or let it dim while the work continues. ⌥⌘A starts or stops it from anywhere. Vigil uses the same standard power assertion as caffeinate and video players, and changes none of your settings.

What none of them can do

On battery, closing a MacBook’s lid always puts it to sleep. That’s a macOS rule, not an app limitation. With power and an external display connected, macOS already keeps a closed MacBook awake (clamshell mode).

Which should you use?

  • Once in a while, and you like Terminal: caffeinate.
  • Your Mac should never sleep on power (a home server, say): change the setting.
  • Often, for a set time, without thinking about it: a menu bar app such as Vigil. See how the keep-awake apps compare.
Try it right here

Vigil, live in your browser

This is the real interface. Click around. If it fits, it's yours for $4.99 once, with 30-day refunds.

Exporting “Wedding film final.mov”
4K · 38 min
41%About 52 minutes left
Export stops if your Mac goes to sleep.
Display sleeps in 0:08
Your Mac went to sleep.The export stopped at 41%. Click to wake it.
VigilOff
AWAKE FOR ANOTHER1:00:00
Keep awake for
Try it: wait, then keep it awake

Related