You can restart the Wi-Fi network in Apple Mac OS X from the Terminal by using the airport
command. Here’s how:
- Open the Terminal application.
- Turn off Wi-Fi:
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
- 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)