Written by
Amanda WongWhen there is a WiFi connection issue on your Mac, some annoying situations occur such as Safari won't open, WiFi no hardware installed, unable to browse websites, the Mac is connected to WiFi but no internet, etc. But the same WiFi works fine on your other devices, iPhone, iPad, and Apple Watch. It means there is no problem with the WiFi network itself, it is your Mac that causes such a problem.
Reset network settings with Terminal
The easiest way to reset MacBook network settings is using Terminal, Mac's command-line interface. All you need to do is enter several commands in Terminal and it will perform the tasks to reconnect to the WiFi.
1. Open Finder > Applications > Terminal, or search it in Spotlight.
2. In the Terminal window, enter the following command to disable the internet connection:
sudo ifconfig en0 down
3. Enter your admin account password.
4. Enter the following command to re-enable the Wi-Fi connection:
sudo ifconfig en0 up
5. If the second one doesn't turn on the Wi-Fi, enter the following command:
ifconfig -a
Now, check whether you can use the WiFi connection properly on your Mac.
Reset network settings in System Preferences
The most common way to reset network settings is to delete and re-add the WiFi interface in System Preferences. It will remove all settings related to the WiFi you connect to, username, and password from your Mac, then you can reestablish the WiFi connection from scratch as you did for the first time.
If you don't want to lose the current network settings, you need to create a new network location as the backup:
- Click on the Apple menu > System Preferences, then choose Network.
- Tap on the Location bar > Edit Locations.
- Click the (+) add button, enter a network name, then click Done.
Note: Since macOS Ventura has removed the Network Locations feature in System Preferences, you need to follow a different process to create a new network location. If you want to reset network settings on macOS Ventura, refer to this guide: How to Add/Remove/Switch Network Locations on macOS Ventura?
Now, you can proceed to delete and re-add the WiFi connection:
- On the left list of the Network interface, select your WiFi connection.
- Click the (-) minus icon to delete the selected one, and click Apply.
- Then click the (+) plus icon to add the WiFi connection back.
- On the pop-up window, choose WiFi under the Interface and click Apply.
- Then, select your WiFi and enter the password to connect to it.
Reset network settings via deleting configuration files
In case the above method doesn't help fix the WiFi connection issue on your Mac, you can try the second method. Deleting all the system files of the network settings on your Mac makes the Mac reestablish new configuration files when you restart the Mac. In this way, you can set the Mac network settings from scratch and solve the issue when Mac won't connect to WiFi.
1. On the Mac desktop, click the WiFi icon on the menu bar, then click the switch to turn it off.
2. Then click Go on the Apple menu bar and choose Go to Folder.
3. Enter /Library/Preferences/SystemConfiguration/ into the text field and click Go.
4. Find and select the following files:
- com.apple.airport.preferences.plist
- com.apple.network.identification.plist or com.apple.network.eapolclient/configuration.plist
- com.apple.wifi.message-tracer.plist
- NetworkInterfaces.plist
- preferences.plist
What Is a PLIST File and How to Open It on Mac?
This post tells what is a plist file and how to open the plist file on Mac. Besides, it also tells you if you can delete plist files on Mac. Read more >>
5. Copy them to your desktop to create a backup just in case.
6. Then move the selected files to Trash to delete them from Mac.
7. Enter the password to confirm if asked.
8. Restart your Mac and turn on the WiFi.
9. Select your WiFi name and enter the password to connect to it.
If the Mac can connect to the WiFi and use it as usual, then you can delete the backup of the configuration files on your desktop. Also, you can run macOS networkQuality command in your Terminal app to test your network quality.