There are a few ways to keep your Mac awake with the lid closed:
Clamshell Mode (Built-in)
This is Apple's official method. Connect your Mac to:
- An external display
- A power adapter
- An external keyboard and mouse (or trackpad)
Then close the lid. Your Mac will stay awake and use the external display.
Using the Terminal
Run this command to prevent sleep indefinitely:
caffeinate -s
Press Ctrl+C to stop it. You can also set a time limit (e.g., caffeinate -t 3600 for 1 hour).
Third-Party Apps
If you need the Mac awake with the lid closed without an external display (e.g., for downloads or running a server):
- Amphetamine (free on the Mac App Store) — has a "Closed-Display Mode" feature specifically for this
- KeepingYouAwake — a lightweight open-source alternative
Important note: Running with the lid closed without an external display can cause heat buildup since MacBooks partially vent through the keyboard. Amphetamine will warn you about this and requires you to enable the feature explicitly in its settings.
Which use case are you trying to solve? I can give more specific guidance if needed.
Top comments (0)