How to keep your WiFi on with Mac lid closed in 3 easy steps

Milan Stanojevic
by Milan Stanojevic
Windows & Software Expert
Milan has been enthusiastic about PCs ever since his childhood days, and this led him to take interest in all PC-related technologies. Before joining WindowsReport, he worked as a front-end web developer. Read more
Affiliate Disclosure
  • Keeping the lid closed while using the WiFi allows you to enjoy listening to your music or favorite podcast while not being bothered by the light from the screen.
  • To achieve this, you will need to use the Terminal, or set the Computer sleep value to Never.
  • If you want to see more detailed Mac guides, don't forget to check out and bookmark our Mac Fix page.
  • If you're interested in seeing other useful and up to date information about this topic, visit our detailed Mac page.
keep wifi on when lid closed macbook
Does your Mac have a backup plan for emergency situations?
Having a clean system and good protection against all types of potential malicious programs is essential. Intego's Mac Premium Bundle X9 can help you in several situations:

  • Clean and optimize every single bit of space on your Mac
  • Keep your system safe with Virus Barrier
  • Create professional backups of your system and data
  • Keep your kids safe while online with Parental Control features

Intego's Mac Premium Bundle X9 has been downloaded by readers this month.

Sometimes you need to keep your Wi-Fi connection active even if your MacBook lid is closed. This is relatively simple to do, and in this article, we’ll show you how to achieve that.

How to keep Wi-Fi on when my MacBook lid is closed?

1. Use the Terminal

This is a quick little workaround that should keep your Wi-Fi on even if the MacBook lid is closed. To do that, you first need to find the application that you want to use to keep your Wi-Fi active. To do that, follow these steps:

  1. Open Finder.
  2. Click on Applications > Utilities.
  3. Now double-click on Activity Monitor.
  4. When the Activity Monitor opens, look for the PID Write down the PID value of the application that you want to use to keep your Wi-Fi awake.
    activity monitor macbook how to keep wifi on when lid closed

After getting the PID number, you need to run a command in the Terminal by following these steps:

  1. Go to Applications > Utilities and start the Terminal.
  2. Run the following command:
    • caffeinate -t 600 -w PID

After doing that, your MacBook should stay awake as long the process with the specified PID is running. You might also want to experiment with different values for the -t parameter.

2. Set Computer sleep value to Never

According to users, you can fix this problem by setting Computer sleep to Never. By doing so, your MacBook won’t go to sleep on its own, and your Wi-Fi will keep working at all times. To change this setting, follow these steps:

  1. Go to Apple menu > System Preferences.
  2. Click on Energy Saver.
  3. Move the Computer sleep slider all the way to the right to Never for both Battery and Power Adapter modes.
    energy saver settings macbook how to keep wifi on when lid closed

We have to mention that by turning off Computer sleep mode, your MacBook might consume more power.

3. Use third-party tools

Mac laptop and phone on desk

If the previous methods didn’t work for you, perhaps it would be best to use third-party tools in order to deal with this issue. The following tools can come in handy if you have problems with Wi-Fi and Sleep Mode:

There you go, a couple of easy solutions that should help you keep your Wi-Fi on even if your MacBook lid is closed.

FAQ: Learn more about WiFi on MacBook

  • Why is WiFi not working on my MacBook?

The most common reasons for the WiFi not working on MacBook are router problems. To see more details about how to resolve this issue, visit this easy-to-follow guide.

  • Who is connected to my WiFi Mac?

To see who else is connected to your WiFi on Mac, you can simply press the Option key and click the WiFi icon.

  • Why does my Mac say my WIFI has no IP address?

The most common reason for this error is caused by a badly-configured network. To solve this issue, navigate to System Preferences, click on Network, and select the WiFi option. Next, you will need to click the drop-down menu found inside the Location box and set it to Automatic.

  • Why does my WiFi have a self-assigned IP address?

Your WiFi shows that it has a self-assigned IP address because of your system’s network setting. You will need to navigate to System Preferences, click Network, select WiFi, click the Advanced option, and enable DHCP.

  • What is a WPA2 password?

This is the name of the password that you use to connect to your WiFi network.

idee restoro
Still having issues with your Mac OS?
Fix them with this tool:
  1. Download and install now Washing Machine X9 from the official website
  2. Wait for an auto scan to start and spot the issues.
  3. Click Clean to start optimizing your Mac OS for a better experience.

This article covers:Topics: