Reset the Wi-Fi connection on Mac

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

macOSWi-FiTerminalMedium risk
Run the command below — Wi-Fi switches off for 3 seconds and comes back on, then rejoins your network automatically.

01Command

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

02What 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

RiskMedium risk
RequirementsThe Wi-Fi interface is usually en0 — confirm with networksetup -listallhardwareports.
CompatibilitymacOS 10.11 El Capitan – 15 Sequoia
!Warning: Wi-Fi drops for a few seconds while the command runs — save any cloud sync or video call first.

04Undo

Undo
$ networksetup -setairportpower en0 on

05Sources

  • macOS networksetup command reference
    SS64 · technical · 2026-09-16
    Evidence: 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