Wireless Networks via CLI on macOS

I love quickly getting information via the CLI that I didn't know could before.

It even shows you the channels that each WIFI network is using.

Here's the command:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s

The output will look something like this (SSIDs redacted with "---------------"):

                            SSID BSSID             RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
                 ---------------                   -90  116     Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -88  112     Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -82  9       Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -81  6       Y  -- RSN(PSK,FT-PSK/AES/AES) 
                 ---------------                   -80  11      Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -76  1       Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -75  149     Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -73  161     Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -71  11      Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -70  1,+1    Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -70  11      Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -68  11      Y  -- WPA(PSK/AES,TKIP/TKIP) RSN(PSK/AES,TKIP/TKIP) 
                 ---------------                   -48  1       Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -46  6       Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -60  36      Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -29  2,+1    Y  -- RSN(PSK/AES/AES)  
                 ---------------                   -53  36      Y  -- RSN(PSK/AES/AES) 
                 ---------------                   -52  157     Y  -- RSN(PSK/AES/AES) 

Why is that useful? Well...

Overlapping channels in WiFi are not desirable because they can lead to interference and reduced performance. It is recommended to use non-overlapping 20 MHz channels, such as channels 1, 6, and 11 in the 2.4 GHz band, to optimize your network and avoid signal overlap. This practice helps minimize interference and ensures better WiFi performance. 1 2 3

Footnotes

  1. https://www.ekahau.com/blog/channel-planning-best-practices-for-better-wi-fi/ (opens in a new tab)

  2. https://www.metageek.com/training/resources/why-channels-1-6-11/ (opens in a new tab)

  3. https://superuser.com/questions/443178/is-it-better-to-use-a-crowded-2-4ghz-wi-fi-channel-1-6-11-or-unused-3-4-8 (opens in a new tab)

Updated Last:2024-04-01T16:27:31.000Z