How to keep your MacBook awake when the Lid is closed

MacBook

Sometimes, you may want to use your MacBook with the lid closed. For example, you might connect it to an external monitor to free up desk space or let it continue downloading files or playing music without interruptions. However, by default, closing the lid puts the MacBook to sleep. Here’s how to prevent that.

Using a MacBook with the Lid Closed

Modern MacBooks and macOS versions make it easier to keep your Mac running with the lid shut. To do this, you’ll need an external monitor, keyboard, and mouse (wired or Bluetooth).

  1. Connect an external monitor, keyboard, and mouse.
  2. Ensure Bluetooth is enabled, and your devices are paired if they are wireless.
  3. Close the MacBook lid once the desktop appears on the external monitor.
  4. If the screen turns off momentarily, press a key or move the mouse to wake the display.
  5. In some cases, your Mac may need to be plugged into a power source to stay awake.

Note: Without an external monitor, closing the lid will still cause the MacBook to sleep.

Preventing Sleep Without an External Monitor

If you want your MacBook to stay awake while downloading files, playing music, or running updates, you can adjust the settings depending on your macOS version.

macOS Monterey and Earlier

  1. Open System Preferences.
  2. Go to Battery (or Energy Saver).
  3. Select “Prevent your Mac from automatically sleeping when the display is off.”

macOS Ventura and Later

In newer versions of macOS, the settings have changed, but you can still keep your Mac awake:

  1. Open Terminal.
  2. Enter this command:
    sudo pmset -a disablesleep 1  
    

Using Third-Party Apps

For a simpler solution, apps like Amphetamine (free) or Caffeinated ($3.99) can keep your Mac awake. These apps override the default sleep settings and provide more control over sleep prevention.

Now you can keep your MacBook active, whether connected to an external display or running tasks with the lid closed.