How To: Restart Apple Mac OS X Airport Networking From the Bash Terminal

You can restart the Wi-Fi network in Apple Mac OS X from the Terminal by using the airport command. Here’s how:

  1. Open the Terminal application.
  2. Turn off Wi-Fi:
    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
  3. Turn on Wi-Fi:
    sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I

Note: The airport command may not be present on all versions of Mac OS X. If it’s not present on your system, you can restart your Wi-Fi network by restarting the network services:

sudo networksetup -setairportpower airport off
sudo networksetup -setairportpower airport on

(Valium)

Leave a Comment