The first thing you’ll want to do is create a symbolic link to the airport command, because it is situated in a very inconvenient location for quick usage. Doing so is very easy, in the Terminal type the following:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
The above may be a bit hard to read on some browsers, so alternatively you can use the following (it does the same thing, just split into two commands):
$ cd /usr/sbin
$ sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
This will prompt you for a root password, enter it and hit return.
Yes, that giant cryptic path through the depths of OS X is where Apple hid the wonderful airport utility, but by running the above command you have just linked that long path to the much shorter ‘airport’ , great. You’ll probably find the -I flag and -S flags to be most useful and informative, so type airport -I at the Terminal prompt, which will return something like the following:
$ airport -I
commQuality: 75
rawQuality: 59
avgSignalLevel: -40
avgNoiseLevel: -97
linkStatus: ESS
portType: Client
lastTxRate: 11
maxRate: 11
lastAssocStatus: 1
BSSID: 00:06:5b:2a:37:10
SSID: OSXNetwork
Security: none
$
Displayed is detailed information on signal quality, noise, security, and other WiFi network attributes. The airport command is more powerful than just being able to list information on the current wireless network though, you can actually manually adjust many settings and troubleshoot too. While there is no manual page for the airport command, attaching the -h command to it will issue a brief list of flags and explanations of their function. Enjoy