Mac Wi-Fi keeps disconnecting: diagnose and fix it
Diagnose and fix repeated Wi-Fi dropouts on macOS using built-in terminal tools: check your connection, read signal stats, reset the interface, and verify the link holds.
What this covers
A Mac that drops Wi-Fi every few minutes usually has one of two causes: a stuck or stale connection, or a weak/noisy signal. This guide walks you through diagnosing which one you have, applying the right fix from the terminal, and verifying the connection actually holds. All commands use tools built into macOS.
Symptom
Check which network you're actually on
Before troubleshooting, confirm what the Wi-Fi interface is doing. Run the command from the guide to print the current SSID. If it says the interface is not associated with any network, the dropouts are full disconnects; if it shows an SSID, your Mac is still linked and the problem may be signal quality. This tells you which fix path to follow.
networksetup -getairportnetwork prints the SSID the Wi-Fi interface is associated with, right now.
$ networksetup -getairportnetwork en0Read live signal strength with wdutil
The menu bar hides the numbers that matter. Run the wdutil diagnostic from the guide and look at RSSI (signal) and noise. An RSSI worse than about -70 dBm, or noise close to the RSSI, points to a weak or noisy link — the most common cause of repeated disconnects. Note the channel too, for the next step.
Use sudo wdutil info to see RSSI, noise, channel and other live Wi-Fi link details that the menu bar hides.
$ sudo wdutil infoScan nearby networks for channel congestion
If the signal looks weak, scan the airwaves around you using the airport scan from the guide. If several networks share your channel, interference can cause periodic drops even with a strong router. If your neighbors' networks crowd your channel, moving your router or switching its channel (on the router, not the Mac) is the durable fix.
List surrounding Wi-Fi networks with signal, channel, and encryption type using the hidden airport scan command.
$ sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -sPower-cycle the Wi-Fi interface
A stuck Wi-Fi association is the most common software cause of dropouts, and the fix from the guide power-cycles the interface without a reboot. It turns Wi-Fi off, waits three seconds, and turns it back on. Your Mac will rejoin its preferred network automatically. This clears stale state in seconds — try it before anything more drastic.
Power-cycle the Wi-Fi interface to fix dropouts and stuck connections — no reboot needed.
$ networksetup -setairportpower en0 off && sleep 3 && networksetup -setairportpower en0 on▾ Undo
$ networksetup -setairportpower en0 onForget and rejoin the problem network
If the same network keeps dropping, its saved profile may be stale — old password state or security settings can cause repeated re-join failures. Use the forget-network guide to first list the remembered networks, then remove the problematic one, then rejoin fresh. The undo command can re-add it if you remove the wrong entry.
List every Wi-Fi network the Mac remembers and delete one so it never auto-joins again.
$ networksetup -listpreferredwirelessnetworks en0 && sudo networksetup -removepreferredwirelessnetwork en0 "CoffeeShop"▾ Undo
$ sudo networksetup -addpreferredwirelessnetworkatindex en0 "CoffeeShop" 0 WPA2PSKRejoin the network with a fresh connection
After forgetting the network, rejoin it from the terminal using the join guide, entering the network name and password. This creates a clean association with current settings, replacing whatever half-broken state was causing the drops. Make sure you type the network name exactly as it broadcasts.
Use networksetup -setairportnetwork to connect your Mac to a Wi-Fi network by name and password without touching the Wi-Fi menu.
$ networksetup -setairportnetwork en0 "HomeWiFi" "wifipassword"Verify the link is healthy again
After the fixes, run the wdutil diagnostic once more. You want a healthy RSSI (better than about -65 dBm), a clear gap between signal and noise, and a connection that holds. Leave it connected for a while; if the RSSI stays stable and you stop seeing dropouts, the problem is resolved. If the numbers sag again, the remaining cause is likely hardware or router-side.
Use sudo wdutil info to see RSSI, noise, channel and other live Wi-Fi link details that the menu bar hides.
$ sudo wdutil infoHow to confirm it worked
After fixing, run the wdutil diagnostic and confirm RSSI is better than about -65 dBm with a clear gap between signal and noise. Stay connected for at least 15–30 minutes without a dropout. If it drops again, the cause is likely router-side or hardware.
Undo everything
Every command above can be reverted. Run these in order to undo all of it.
$ sudo networksetup -addpreferredwirelessnetworkatindex en0 "CoffeeShop" 0 WPA2PSK
networksetup -setairportpower en0 onReview before running — some steps may not be independent.
Sources
- networksetup — network configuration tool (macOS man page)Evidence: Documents -getairportnetwork <device>, which prints the SSID of the currently associated wireless network.
- wdutil — Wi-Fi diagnostics information (macOS man page)Evidence: Documents `sudo wdutil info`, which prints the current Wi-Fi link details: SSID, RSSI, noise, channel, PHY mode and security type.
- airport - Wireless Link ConfigurationEvidence: Documents the airport -s scan, listing SSID, BSSID, RSSI, channel, and security (encryption) type of nearby networks.
- Connect to the internet on your MacEvidence: Describes joining a Wi-Fi network by selecting its name and entering the password — the same association the setairportnetwork command performs.
Last verified: 2026-09-21
Related guides
Step-by-step Terminal guide to fix AirDrop on macOS: check awdl0, restart sharingd, bounce the wireless interface, and verify Bluetooth is healthy.
Measure your Mac's real internet speed from Terminal with Apple's built-in networkQuality tool, then use ping and curl to find out whether the slowdown is your Wi-Fi, your Mac, or your provider.
Find out whether macOS detects your external monitor, re-apply a working display mode with displayplacer, and verify the connection is healthy.