How to keep your Mac awake (without changing your settings)
Your Mac goes to sleep to save power, which is great until it happens in the middle of a big download, a long build, or a presentation. You could change your sleep settings and try to remember to change them back. Or you can keep your Mac awake just for as long as you need. Here are four ways, from built-in to one click.
Why your Mac sleeps when you don't want it to
macOS turns off the display after a few minutes without keyboard or mouse input, then lets the Mac sleep. Apps can ask macOS to hold off, and video players and presentation apps usually do. But a download in your browser, a script in Terminal, or a video call in a tab often doesn't ask, so the screen dims anyway.
1. Change your sleep settings (built in)
The permanent fix lives in System Settings:
- Lock Screen: change Turn display off on battery when inactive and Turn display off on power adapter when inactive to a longer time, or Never.
- Battery › Options (on a MacBook): turn on Prevent automatic sleeping on power adapter when the display is off to keep downloads and builds going with the screen off.
This works, but it's all or nothing. Set the display to never turn off and you'll waste battery the rest of the week, unless you remember to set it back.
2. Use caffeinate in Terminal (built in)
Every Mac includes caffeinate, a command that keeps your Mac awake while it runs. Open Terminal and try one of these:
| Command | What it does |
|---|---|
caffeinate -d | Keeps the display on until you press Control-C |
caffeinate -i | Keeps the Mac awake but lets the display turn off |
caffeinate -d -t 3600 | Keeps the display on for one hour (3,600 seconds), then stops |
caffeinate -i make | Keeps the Mac awake until the command after it finishes |
The last one is the developer's favourite: put caffeinate -i in front of a long build, test run, or backup script, and your Mac stays awake exactly as long as the job takes. The catch is that you need a Terminal window, and it's easy to forget one is running.
3. Use a menu bar app
Several free apps put a keep-awake switch in your menu bar:
- Amphetamine: free on the Mac App Store, with timers, triggers (for example, while a certain app is open or a download is running), and a closed-display mode.
- KeepingYouAwake: free and open source. One click toggles it, with optional time limits. It uses
caffeinateunder the hood.
Both are good. If you want rules that switch on by themselves, Amphetamine is the most capable option.
4. Use your MacBook notch
If you already use NotchDude for music, clipboard history, or your AI limits, you don't need another menu bar icon. (Disclosure: I make NotchDude.) Hover the notch, open the ··· menu, choose Keep Mac Awake, and pick 30 Minutes, 1 Hour, 2 Hours, or Until Turned Off.
- The menu shows when it ends, so you know it'll switch itself off.
- A small cup appears on the closed notch while it's on, so it's never on by accident.
- It keeps the display from sleeping, like
caffeinate -d, and stops cleanly when the time is up or when you choose Turn Off.
It's free. It doesn't have Amphetamine's triggers, but for "don't sleep for the next hour" it's the fewest clicks.
What about with the lid closed?
Closing a MacBook's lid puts it to sleep, and most keep-awake tools, including caffeinate and NotchDude, don't change that. The exception is clamshell mode: connect power, an external display, and a keyboard or mouse, and your MacBook keeps running with the lid shut. Amphetamine also offers a closed-display mode if you need it without a monitor.
Which should you use?
- Long build or script:
caffeinate -iin front of the command. - Automatic rules: Amphetamine.
- A quick "stay on for an hour": KeepingYouAwake, or NotchDude if you already have it.
- Never want it to sleep: change your settings in System Settings.
FAQ
Does caffeinate keep my Mac awake with the lid closed?
Not on its own. Closing a MacBook's lid puts it to sleep unless it's in clamshell mode: connected to power and an external display, with an external keyboard or mouse. Some apps, like Amphetamine, offer a closed-display mode.
How do I stop caffeinate?
Press Control-C in the Terminal window where it's running. If you started it with a time limit, such as caffeinate -t 3600, it stops on its own when the time is up.
Will keeping my Mac awake drain the battery?
Yes, faster than usual, mostly because the display stays on. Plug in for long sessions, and use a timer rather than leaving it on indefinitely.
Does Keep Mac Awake in NotchDude need Pro?
No. Keep Mac Awake is free, in the notch's ··· menu.
Keep your Mac awake from the notch
Keep Mac Awake is free in NotchDude, along with music controls, Focus, Calendar, and Notes. Your first 48 hours include every Pro feature.
macOS 14+ · Apple silicon