Sunday, February 7, 2016

Managing WIFI connections using the Mac OSX terminal command line

cara connect wifi pake terminal

I’m a command line guy, if there’s a way to do something via the terminal I’ll always choose it over using a GUI interface.  One thing I find myself doing alot is messing with my wireless settings on my Macbook Air.  I spent some time tracking down how to do alot of this via the command line, if this is interesting to you, please read on.
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

    0 comments:

    Post a Comment