Skip to content

Instantly share code, notes, and snippets.

@SimplGy
Last active August 29, 2015 14:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save SimplGy/ed964656e52469237bfa to your computer and use it in GitHub Desktop.
OSX wifi-related terminal commans

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

Leave a wifi network

// TODO

Find your network interface name

networksetup -listallhardwareports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment