← All articles

How to keep your Mac awake: caffeinate, Amphetamine and the alternatives (2026)

Keep a Mac awake until a download or build finishes: System Settings, the caffeinate command, Amphetamine, KeepingYouAwake, Lungo and OneNotch's Keep Awake compared.

In this article

You start a 40 GB download, a long export or an overnight build, walk away, and come back to a Mac that went to sleep twenty minutes in. macOS is doing what it should: saving power when nobody is touching it. You just need it to stop for a while. Here is every way to keep a Mac awake, from the setting already on your Mac to the caffeinate command and the apps people usually install, and when each one is the right pick.

Quick disclosure: we make OneNotch. Everything about OneNotch below describes version 2.1.0 (October 2026), where Keep Awake is new. Facts about the other apps come from their own App Store pages, sites and documentation, checked on October 21, 2026.

Why your Mac goes to sleep in the middle of a download

A Mac sleeps after a stretch with no keyboard or trackpad input. A download, a render or a git clone is not input, and many apps do not tell macOS they are still working.

There are two different things you may want:

  • The Mac stays awake, the screen may turn off. Right for downloads, backups, builds, renders, remote access over SSH or Screen Sharing.
  • The screen stays on too. Right for reading a long document, a dashboard on a wall, a recipe, or anything you watch without touching.

Every tool below lets you pick one or the other, so decide first which you need.

Option 1: change System Settings (permanent)

If you want your Mac to stay awake every day, change the default:

  1. Open System Settings › Lock Screen and set "Turn display off on power adapter when inactive" (and, on a laptop, "on battery when inactive") to a longer time or Never.
  2. On a MacBook, open System Settings › Battery › Options… and turn on "Prevent automatic sleeping on power adapter when the display is off" if you want the Mac to keep running with the screen dark.

Fine for a desktop Mac that works as a server; on a laptop you have to remember to change it back.

Option 2: the caffeinate command (built in, free)

Every Mac ships with caffeinate, Apple's command for holding off sleep. Open Terminal and use one of these:

CommandWhat it does
caffeinate -iKeeps the Mac awake; the display may still turn off. Press Control-C to stop.
caffeinate -dKeeps the display on as well.
caffeinate -i -t 3600Keeps the Mac awake for 3,600 seconds (one hour), then stops by itself.
caffeinate -i makeRuns make and keeps the Mac awake exactly as long as it runs. Works with any command: rsync, ffmpeg, a build script.
caffeinate -i -w 4242Keeps the Mac awake until process 4242 exits. Find the number with pgrep -x AppName or in Activity Monitor.

Two details from Apple's man page are worth knowing. The -s flag keeps the whole system awake only while the Mac is on AC power, and -t is ignored when you wrap a command, because the command decides how long it lasts.

When caffeinate is the right answer: anything that runs in Terminal. Wrapping the job ends the keep-awake the moment the job does. The catch is that there is no indicator: forget a caffeinate -d in a tab and your screen stays on all night.

Option 3: a keep-awake app

An app gives you a button and an icon that tells you it is on.

Amphetamine

Free on the Mac App Store, with no in-app purchases, and the one with the most triggers by far. It can keep the Mac awake indefinitely, for a set time or until a clock time, and start or stop on its own while a file is downloading, while a specific app is running, while an external display, drive or USB or Bluetooth device is connected, on a Wi-Fi network or VPN, or by battery level, CPU use and idle time. It can end a session when the battery is low, let the display sleep, and supports closed-lid use (on Apple silicon that needs an extra script and your admin password). It also supports AppleScript. The App Store listing shows version 5.3.2 from November 2023 as the latest, and macOS 10.13 or later.

KeepingYouAwake

Free and open source (MIT), a small menu bar app built on top of caffeinate. Pick a preset duration or leave it on, and it can turn itself off when the battery runs low. It does not keep a MacBook awake with the lid closed. The latest release, 1.6.8, came out in September 2025.

Lungo

By Sindre Sorhus, a $4 one-time purchase on the Mac App Store or through Setapp. Preset durations or until you turn it off, an option to let the display sleep, to pause while the screen is locked, and to switch off when you go on battery. It has Shortcuts actions, a URL scheme and a command-line helper, which makes it the best pick for automation. The current version needs macOS 26; older builds for macOS 10.13 to 15 are on its website. Lungo says it cannot keep a closed laptop awake, except on a charger with an external display.

OneNotch Keep Awake (new in 2.1.0)

OneNotch is a notch app, and since 2.1.0 the open notch has a Keep Awake cup in the left orb. It is also in the menu bar, under OneNotch's icon.

  • Click the cup to start, and pick how long: 15 minutes, 30 minutes, 1, 2, 4 or 8 hours, until you turn it off, or until the end of your workday (you set when that is; once the time has passed the choice disappears, so it never runs overnight by accident). A running timed session has an "Add 1 hour" button.
  • Screen on or off. "Keep screen on" is the default. Switch it off and the Mac keeps running while the screen sleeps, or click "Turn the screen off, keep the Mac running" to darken it right now. Locking your Mac lets the screen turn off while the Mac stays awake.
  • A battery floor. On battery, Keep Awake turns off below 15% by default (or 10, 20 or 30%, or never). It does not check the battery while you are plugged in.
  • You can see it is on. A cup and the end time on the closed notch when nothing else is showing, a dot on the menu bar icon, and a short note that tells you why it turned off.
  • It keeps going through a restart of OneNotch. If OneNotch restarts or installs an update while a session is running, the session carries on with the same end time.
  • Closing the lid ends it. Putting the Mac to sleep, by closing the lid or from the Apple menu, turns Keep Awake off. There is no closed-lid mode.

All of that is free. OneNotch Pro adds two things: keeping the Mac awake until an app quits (click the app's icon on the Keep Awake page, or pick another running app), and a heads-up two minutes before a timed session ends, so you can add time before the Mac falls asleep on you.

One limit to be clear about: "until an app quits" watches apps with a window, such as Xcode, Final Cut Pro, an installer or a game launcher. It does not see a command running in Terminal. For that, caffeinate -i your-command is still the better tool.

Comparison: Amphetamine vs caffeinate vs KeepingYouAwake vs Lungo vs OneNotch

AmphetaminecaffeinateKeepingYouAwakeLungoOneNotch
PriceFreeBuilt inFree, open source$4 onceFree; "until an app quits" with Pro
Timed sessionsYes, or until a clock time-t in secondsPresetsPresets; custom via Shortcuts15 min to 8 h, or until workday ends
Until a job finishesDownload, app and many other triggersWrap a command, or -w a processNot listedNot listedUntil an app quits (Pro)
Screen on or offYes-d or -iNot listedYesYes, plus "turn the screen off now"
Low-battery cutoffYesNoYesTurns off on batteryYes, 10 to 30%
Closed lidYes, extra setup on Apple siliconNoNoOnly on a charger with a displayNo, closing the lid ends it
IndicatorMenu bar, time leftNoneMenu barMenu barClosed notch and menu bar dot
Warning before it endsNot listed for timed sessionsNoNot listedNot listed2 minutes before (Pro)
AutomationAppleScript, hotkeysIt is the command lineURL schemeShortcuts, URL scheme, CLINone yet
macOS10.13+Every version10.13+26 for the current version15+, Apple silicon

Which one should you use?

  • A command in Terminal (a build, rsync, a model training run): caffeinate -i your-command. Free and exact.
  • Keep a MacBook awake with the lid closed: Amphetamine is the one that supports it. On a charger with an external display, macOS already keeps the Mac running in clamshell mode.
  • Rules that start a session on their own (a display connected, a Wi-Fi network, a download): Amphetamine.
  • Shortcuts and scripting: Lungo.
  • Free, open source and tiny: KeepingYouAwake.
  • You already use OneNotch, or want one app for the notch and fewer menu bar icons: OneNotch's Keep Awake, with the cup on the notch telling you it is on. Add Pro if you want "until Xcode quits" instead of guessing how long an export will take.

If you give presentations or share your screen, OneNotch's teleprompter and presenting mode also keeps the Mac awake while you present. Keep Awake sits next to the other notch tools new in 2.1.0, among them per-app volume. For the wider field of notch apps, see the best Mac notch apps.

OneNotch is free to download, with no account: macOS 15 or later on Apple silicon. Pro is a one-time purchase at $9.99 lifetime, or $6.99 with code LAUNCH30, for 2 Macs; a $24.99 Supporter plan covers 5 Macs with the same features.

Frequently asked questions

How do I keep my Mac awake without installing an app?

Open Terminal and run caffeinate -i to keep the Mac awake, or caffeinate -d to keep the screen on too, and press Control-C to stop. To keep it awake only while one job runs, put caffeinate -i in front of the command, for example caffeinate -i make. You can also change the sleep timers in System Settings › Lock Screen, but that applies every day until you change it back.

How do I stop caffeinate?

Press Control-C in the Terminal window where it is running, or close that window. If you started it with -t, it stops by itself after that many seconds. If it wraps a command or watches a process with -w, it stops when that command or process ends.

What is a free alternative to Amphetamine?

KeepingYouAwake is free and open source and covers timed sessions and a low-battery cutoff from the menu bar. The built-in caffeinate command is free on every Mac. OneNotch's Keep Awake, new in 2.1.0, is free too, with timed sessions up to 8 hours, until the end of your workday, a battery floor and an indicator on the notch; keeping the Mac awake until an app quits is part of OneNotch Pro.

Can I keep my MacBook awake with the lid closed?

On a charger with an external display, keyboard and mouse connected, macOS keeps running in clamshell mode by itself. On battery or without a display, you need a tool that supports closed-lid mode, such as Amphetamine, which needs extra setup on Apple silicon. OneNotch's Keep Awake does not do this: closing the lid ends the session.

Will keeping my Mac awake keep my Slack or Teams status active?

No. Keep-awake tools stop the Mac and the screen from sleeping; they do not pretend you are typing, so Slack and Teams can still show you as away after a while. That is true for caffeinate and for OneNotch's Keep Awake.

Does OneNotch's Keep Awake drain my battery?

Keeping the screen on uses battery, whichever tool does it. OneNotch lets the screen turn off if you choose, darkens it on demand while the Mac keeps running, and turns Keep Awake off when the battery falls below the level you set, 15% by default, while you are on battery.