wi-fi setup through command line

http://blog.mattcrampton.com/post/64144666914/managing-wifi-connections-using-the-mac-osx

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 SSID

If the wi-fi requires a password

networksetup -setairportnetwork en0 SSID WIFI_PASSWORD

If the wifi requires both username and password

networksetup -setairportnetwork en0 SSID USERNAME WIFI_PASSWORD

Find your network interface name

networksetup -listallhardwareports
Advertisements

About cgao

Cambridge, MA
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s