airport – the Little Known Command Line Wireless Utility for Mac
Hidden from the casual Mac user is a spiffy command line utility that allows you to view, configure, and troubleshoot your Mac’s wireless connection, entirely from the Terminal of MacOS and Mac OS X. This command has a help file but is otherwise but not much documentation, and judging by the obscure location of the command, Apple probably didn’t think it would be too useful for the average Mac user. But the hidden command line airport tool is very useful indeed, particularly for more advanced Mac users who want to have full control over their wi-fi hardware directly from the command line in Mac OS X.
With that in mind, here is how to access the amazingly useful yet little-known airport tool, and how you can use it for some networking tasks too.