Guides: keeping a Mac awake

The built-in ways first, apps second. Every guide is dated and says what it couldn't verify.

Updated

Amphetamine for Mac: settings for closed-lid mode, and an alternative

How to set up Amphetamine's Closed-Display Mode on Apple Silicon, what Power Protect is, the known timed-session issue, and when another app fits better.

caffeinate on Mac: every flag explained (and why it can't keep the lid closed)

What caffeinate -d, -i, -m, -s, -u, -t and -w do on macOS, the commands worth remembering, and why caffeinate can't keep a closed MacBook awake.

Clamshell mode without a charger or external display

Can a MacBook run with the lid closed on battery, without a charger or monitor? Apple's clamshell requirements, why it sleeps, and the ways around it.

Keep Claude Code / Codex running with the MacBook lid closed

Keep Claude Code or Codex working on a MacBook with the lid closed: tmux, two hooks that switch keep-awake on and off, remote access, battery and heat.

How to stop your iMac or Mac mini from sleeping

Keep an iMac, Mac mini or Mac Studio awake with built-in settings: Energy options, display timeout, pmset and caffeinate. No app needed for desktops.

MacBook close lid settings, explained

There's no 'when I close the lid' setting on a Mac. Here's what macOS does on lid close, which settings affect it, and how to keep a Mac on when the lid is closed.

How to prevent your Mac from sleeping (even with the lid closed)

Five ways to stop a Mac from sleeping: System Settings, caffeinate, pmset, clamshell mode and an app — and which ones still work when you close the lid.

How to prevent a MacBook from sleeping

MacBook-specific ways to stop sleep: battery vs power-adapter settings, pmset -b and -c, Low Power Mode, and what to do when the lid is closed.

Comparisons, tools and more