• Using the Command Line Wireless Utility “airport”

    Home » Forums » AskWoody support » Apple » Apple operating systems » macOS » Using the Command Line Wireless Utility “airport”

    Author
    Topic
    #2281596

    I had to locate the BSSID of Wi-Fi networks for a Microsoft Teams deployment. On Windows, it can be done running PowerShell as Admin and running this command:

    netsh wlan show networks mode=Bssid | findstr “BSSID”

    Since I’m on a Mac, I needed to find a way to run a similar command using Terminal on the Mac.

    Enter “airport”, Apple’s command-line wireless utility. It is named “airport” since Apple’s Wi-Fi settings used to be referred to as “Airport” in previous versions of Mac OS X (it was changed prior to the macOS rename) to match Apple’s Airport Wi-Fi hardware.

    This article did the trick. Since I’m on Catalina, I first ran this command to easily use the “airport” command in the Terminal:

    sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport

    Between running airport -s (which shows the BSSID of every Wi-Fi network one’s Mac can pick up) and airport -I (which shows the BSSID of my currently connected network), I found what I need.

    The tools can also provide a wealth of additional raw data as well. For those who need additional details on one’s Wi-Fi network from the command line, give it a try!

    Nathan Parker

    1 user thanked author for this post.
    Viewing 1 reply thread
    Author
    Replies
    • #2281610

      Nathan, I launched “airport” using the ‘sudo’ command in the article, tried running it with the switches  -s and -I and all worked as advertised. I was not aware of this application, so thanks for letting people know about it.

      (Also, I am waiting to hear if it is OK to install the latest security updates for macOS and Safari that came out a few days ago — I’m still on Mojave.)

      Ex-Windows user (Win. 98, XP, 7); since mid-2017 using also macOS. Presently on Monterey 12.15 & sometimes running also Linux (Mint).

      MacBook Pro circa mid-2015, 15" display, with 16GB 1600 GHz DDR3 RAM, 1 TB SSD, a Haswell architecture Intel CPU with 4 Cores and 8 Threads model i7-4870HQ @ 2.50GHz.
      Intel Iris Pro GPU with Built-in Bus, VRAM 1.5 GB, Display 2880 x 1800 Retina, 24-Bit color.
      macOS Monterey; browsers: Waterfox "Current", Vivaldi and (now and then) Chrome; security apps. Intego AV

      1 user thanked author for this post.
    • #2281627

      “netsh” is actually a command line utility, not PowerShell, but you can run it from within PowerShell.

      cheers, Paul

      1 user thanked author for this post.
    Viewing 1 reply thread
    Reply To: Using the Command Line Wireless Utility “airport”

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: