How to adjust network settings in OS X via the command line
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 … Read more