How can I keep my MacBook on when closed?

How can I keep my MacBook on when closed?
I’ve been trying to figure out how to keep my MacBook on when closed, but I’m facing some challenges. Every time I close the lid, my MacBook goes to sleep, which interrupts my workflow. This is especially inconvenient when I’m using an external monitor or when I want to keep my applications running without having to keep the lid open. I’ve heard there are ways to keep it awake even when it’s closed, but I’m not exactly sure how to do that. I’m looking for a way to configure my MacBook so that it remains active and functional while the lid is shut, avoiding any disruptions to my tasks. If anyone could provide some insights or step-by-step instructions on how to achieve this, it would be greatly appreciated.
5 Answers

For those who prefer a hardware-based solution, setting up your MacBook in clamshell mode is a practical choice. Here’s what you can do:
- Connect your MacBook to an external monitor using the appropriate cable.
- Keep your MacBook plugged in with the power adapter to avoid battery depletion.
- Use an external keyboard and mouse, either wired or Bluetooth.
- Close the lid; your MacBook will transition to using the external monitor as the main display.
This transforms your MacBook into a desktop setup, facilitating continuous work flows.

To keep your MacBook awake with the lid closed, you can use an external keyboard and mouse. Here’s a simple method to do this:
- Connect an external display to your MacBook.
- Plug in the power adapter to ensure it stays charged.
- Connect an external keyboard and mouse via Bluetooth or USB.
- Close the lid of your MacBook. Your display should now be on the external monitor.
This setup works effectively for me and keeps my MacBook running smoothly.

Adjusting your MacBook’s system settings is another way to keep it awake when closed. Follow these steps:
- Open ‘System Preferences’ from the Apple menu.
- Navigate to ‘Energy Saver’ settings.
- Ensure the option ‘Prevent computer from sleeping automatically when the display is off’ is checked.
These settings will help maintain your MacBook’s activity even when you shut the lid. It’s a straightforward approach that typically solves the issue.

If you’re comfortable with using software solutions, the application Amphetamine can be quite handy. Here are the steps to use Amphetamine:
- Download and install Amphetamine from the Mac App Store.
- Launch Amphetamine and create a new session.
- Customize the session settings to keep your MacBook awake according to your needs.
- Close the lid—your MacBook will remain awake based on the session’s configuration.
Amphetamine is a versatile tool that provides a great deal of control over your MacBook’s sleep settings.

An advanced option involves using the Terminal application to keep your MacBook awake. Here’s a succinct guide:
- Open ‘Terminal’ from Applications > Utilities.
- Enter the command:
sudo pmset -a disablesleep 1
. - Close the lid and your MacBook should remain active.
While this method requires familiarity with Terminal commands, it is effective in preventing your MacBook from sleeping.