Manage WIFI using The OSX Command Line

Managing WIFI using The OSX Command Line

The OSX terminal has several command line tools that allow you to manage your WIFI settings. Connecting, disconnecting and scanning for available WIFI networks is easy once you know which command does what.

Turn off wifi on your macbook from the Mac OSX terminal command line:

> networksetup -setairportpower en0 off

Turn on wifi on your macbook from the Mac OSX terminal command line:

> networksetup -setairportpower en0 on

List available wifi networks from the Mac OSX terminal command line:

> /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport scan

Join a wifi network from the Mac OSX terminal command line:

> networksetup -setairportnetwork en0 WIFI_SSID_I_WANT_TO_JOIN WIFI_PASSWORD

Find your network interface name

> networksetup -listallhardwareports
Post A Twitter Response To This Blog Post

To: @mattccrampton

0