Mac Terminal WiFi Commands

Mac Terminal WIFI Commands

I'm seeing over a thousand people a day show up here looking for the mac terminal WiFi commands.

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.

Hopefully this list of command line wifi tools is helpful...

Pause reading for 5 seconds...
Please Join My Mailing List
Note: I will never share your email with anyone else.
Awesome! Thanks so much.
Ok, lets continue.

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

> networksetup -setairportpower en0 off

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

> networksetup -setairportpower en0 on

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

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

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

> networksetup -setairportnetwork en0 WIFI_SSID_I_WANT_TO_JOIN WIFI_PASSWORD

#5. Find your network interface name:

> networksetup -listallhardwareports

Once you know how, it's easy to use the mac terminal WiFi commands. Not sure why they're buried in the OSX documentation so deeply, but hopefully this is helpful to someome.