- What is the airport command on Mac OS X?
- Can I control my Mac's wireless card from the command line?
- Can I get information about my Mac's wireless connection from the command line?
- Mac OS X 10.5 and later (and possibly other versions)
- Mac Airport wireless card or built in Wi-Fi
- Command line via Terminal application
- This command requires familiarity with the Mac OS X command line
Mac OS X (tried on 105 but probably on earlier versions as well) contains a well-hidden command line command for querying and controlling a Mac's Airport card and connection to wireless networks. The command is not well-documented but contains some built-in help. It can be very useful in quickly showing you which specific access point you are connected to, channel numbers, signal strength, and so on.
On 10.5 or later, the command can be found at:
To get information about your wireless connection, run the command with the option --getinfo or -I:
If you use the command frequently you may want to create a symbolic link to it in your home directory or a directory in your path so you don't have to type the full path name every time.
You can run the command with the --help or -h argument to get it to show you all available options and arguments. It allows you to associated and disassociate with different wireless networks from the command line, along with a lot of other functionality.
While the risk is low, you do want to be careful if you are not sure what the different options are, as it could cause your Mac to lose its network connection or set up a peer-to-peer wireless network.