If you are troubleshooting a complex Wi-Fi issue on a Mac—such as overlapping channels, weak signal strength (RSSI), or interference (noise)—the standard Wi-Fi icon in the macOS menu bar provides almost no useful diagnostic data. While Apple hides a graphical wireless diagnostic tool deep within the system, network administrators and IT professionals rely on the terminal. By using the hidden macOS airport command-line utility, you can force the Mac’s wireless card to perform a deep scan of the surrounding airspace and return raw, unfiltered network telemetry.
Why Use the airport Command?
The airport command bypasses the simplified user interface to directly query the Mac’s 802.11 wireless hardware. It allows you to see every broadcasting network (BSSID) in your physical vicinity, the exact radio channel they are using, their security protocols, and most importantly, their exact signal strength and noise metrics. This data is critical for proving that a router needs to be moved, that you are suffering from co-channel interference, or that a rogue access point is operating in your area.
Step 1: Create a Symlink to the Command
Apple does not put the airport command in the standard user executable path. It is buried deep inside the core system frameworks. To use it easily, you should first create a symbolic link (a shortcut) so you don’t have to type the massive file path every time.
- Open the macOS Terminal application.
- Type the following command and press Enter:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport
You will need to enter your Mac’s administrator password. Once executed, you can now simply type airport in the terminal to run the tool.
Step 2: Perform a Wireless Scan
The most powerful feature of the tool is the ability to scan the environment.
- Run the following command:
airport -s
Your Mac will pause for a few seconds as the wireless card actively scans the 2.4GHz, 5GHz, and 6GHz (if applicable) spectrums. It will then print a table of every network it can hear.
Step 3: Analyze the Scan Output
Understanding the table is critical for network diagnostics.
- SSID: The public name of the Wi-Fi network.
- BSSID: The unique MAC address of the physical router or access point broadcasting that network.
- RSSI (Received Signal Strength Indicator): The signal strength, measured in negative decibels (dBm). The closer to 0, the stronger the signal. For example,
-45is excellent;-85is terrible and will cause dropouts. - CHANNEL: The specific radio frequency channel the router is using. If you see five neighbors all broadcasting on Channel 6, you need to change your router to Channel 1 or 11 to avoid interference.
- HT: Indicates if the network supports High Throughput (802.11n) or Very High Throughput (802.11ac).
- SECURITY: Shows the exact encryption protocol (e.g., WPA2, WPA3).
Step 4: View Current Connection Info
If you only want to see the detailed telemetry for the network you are currently connected to, use the info flag.
- Run the command:
airport -I
This will display your current link speed (Tx Rate), which mathematically proves the maximum theoretical bandwidth your Mac is currently negotiating with the router.
By leveraging the airport utility, macOS users can diagnose physical layer Wi-Fi problems with precision, replacing guesswork with hard wireless data.