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.

macOSnetworknetworksetupWi-FiwdutilsecurityDiagnosticsMedium risk
First check your current connection state, then power-cycle the Wi-Fi interface off and on from the terminal.

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

?Your Mac repeatedly loses Wi-Fi: the menu bar icon drops to empty or the network stops loading pages, and it reconnects on its own or requires you to click the network again. It may happen at regular intervals or randomly, often on one specific network more than others.

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.

Command
$ networksetup -getairportnetwork en0

Read 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.

Command
$ sudo wdutil info

Scan 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.

Command
$ sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -s

Power-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.

macOSReset the Wi-Fi connection on MacMedium riskStep 4

Power-cycle the Wi-Fi interface to fix dropouts and stuck connections — no reboot needed.

Command
$ networksetup -setairportpower en0 off && sleep 3 && networksetup -setairportpower en0 on
▾ Undo
Undo
$ networksetup -setairportpower en0 on

Forget 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.

macOSForget a Wi-Fi Network with networksetupMedium riskStep 5Optional

List every Wi-Fi network the Mac remembers and delete one so it never auto-joins again.

Command
$ networksetup -listpreferredwirelessnetworks en0 && sudo networksetup -removepreferredwirelessnetwork en0 "CoffeeShop"
▾ Undo
Undo
$ sudo networksetup -addpreferredwirelessnetworkatindex en0 "CoffeeShop" 0 WPA2PSK

Rejoin 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.

macOSJoin a Wi-Fi Network from the TerminalLow riskStep 6Optional

Use networksetup -setairportnetwork to connect your Mac to a Wi-Fi network by name and password without touching the Wi-Fi menu.

Command
$ 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.

Command
$ sudo wdutil info
!Commands that turn Wi-Fi off will disconnect you briefly — don't do this mid-download or during a video call. Forgetting a saved network removes its stored password; make sure you know the network password before deleting it. The airport scan command requires sudo.

How 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.

Undo everything
$ sudo networksetup -addpreferredwirelessnetworkatindex en0 "CoffeeShop" 0 WPA2PSK
networksetup -setairportpower en0 on

Review before running — some steps may not be independent.

Sources

Last verified: 2026-09-21

Related guides