Reset the Wi-Fi connection on Mac
Power-cycle the Wi-Fi interface to fix dropouts and stuck connections — no reboot needed.
01Command
$ networksetup -setairportpower en0 off && sleep 3 && networksetup -setairportpower en0 on02What it does
Toggling the interface power with networksetup does the same clean reset as clicking the Wi-Fi menu off and on, but it also clears the interface state properly, which often fixes 'connected but no internet'. Check your interface name first with networksetup -listallhardwareports — it is en0 on most MacBooks. If the network still fails after the reset, forget and rejoin the network in Wi-Fi settings.
03Risk
04Undo
$ networksetup -setairportpower en0 on05Sources
- macOS networksetup command referenceEvidence: networksetup -setairportpower turns the Wi-Fi hardware interface on and off; -listallhardwareports maps interface names like en0.
Last verified: 2026-09-16 · Category: Network
06Related solutions
Point macOS screen captures at any folder you choose instead of the desktop.
Grab any file from the web straight into the current folder — no browser needed.
List the biggest files in your home folder that are eating disk space.