Scan Wifi from Terminal

There is a command line tool that allows you to work with the wireless connection on your Mac. The tool is very useful but by default hidden and not well documented.



Turn on/off and join

Let`s start a wifi scan and get some information

Note: If do not specify the interface, airport will use the first wifi interface on the system.

Easy way


The captured packets you will find as “/tmp/airportSniffXXXXXX.cap”.