If you need to adjust network settings on your Mac, the quickest route is to do so through the OS X system preferences and menu extras. However, you can also make these changes -- adding and removing ports, creating new locations, switching to DHCP from manual configurations, changing MTU sizes, and managing 802.1x profiles, among others -- via the command line.
The utility for doing this is the command "networksetup," which can be used to quickly apply a change to a specific network property. This tool covers every aspect of the Mac's network setup and you can look at all of its options by simply running networksetup by itself in Terminal to see a list of all supported command options. The list is quite extensive, but when it comes to basic Wi-Fi management, there are a few options that are relatively easy to remember and put to use.
- Turning Wi-Fi on or off With the following options, you can get the power status of the current Wi-Fi card and change it if needed:
networksetup -getairportpower <device name> networksetup -setairportpower <device name> <on off>
- Setting the AirPort network With these options you can change the network AirPort uses (see below for how to scan for Wi-Fi networks via the command line):
networksetup -getairportnetwork <device name> networksetup -setairportn... [Read more]
by Topher Kessler via CNET
No comments: