How to get a list of all the visible WiFi networks using zsh terminal

I want to list down all the visible WiFI Networks available using zsh. I know this is possible for linux (Found this interesting discussion here https://askubuntu.com/questions/567006/how-can-i-display-the-list-of-available-wi-fi-networks)


How can I do the same thing for a Macbook with macOS Sequoia?

MacBook Pro 14″, macOS 15.5

Posted on Oct 16, 2025 8:44 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 17, 2025 5:11 AM

sasika288 wrote:

I want to list down all the visible WiFI Networks available using zsh. I know this is possible for linux (Found this interesting discussion here https://askubuntu.com/questions/567006/how-can-i-display-the-list-of-available-wi-fi-networks)

How can I do the same thing for a Macbook with macOS Sequoia?

You don't. This is privacy sensitive information because it could be used to identify a user's precise location. Therefore, it can't be done from a script. You have to use the UI.

2 replies
Question marked as Top-ranking reply

Oct 17, 2025 5:11 AM in response to sasika288

sasika288 wrote:

I want to list down all the visible WiFI Networks available using zsh. I know this is possible for linux (Found this interesting discussion here https://askubuntu.com/questions/567006/how-can-i-display-the-list-of-available-wi-fi-networks)

How can I do the same thing for a Macbook with macOS Sequoia?

You don't. This is privacy sensitive information because it could be used to identify a user's precise location. Therefore, it can't be done from a script. You have to use the UI.

Oct 17, 2025 5:01 AM in response to sasika288

Since macOS is a UNIX operating system and not based on Linux, you will not find an equivalent tool such as the nmcli (Network Management CLI) that is part of several Linux distros. Simply click on System Settings > Network > Wi-Fi and look at the Other Networks list. The airport command line solution you will see in older online posts is long since deprecated and no longer usable.


Alternatively, if you want more detail, then you could look in the Mac App Store for a specialized tool that provides the detail you seek. Search for "network scan".


With macOS Sequoia (15.7.1), pressing the option key and clicking on the network symbol in the menu bar no longer displays the list of these other networks.



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to get a list of all the visible WiFi networks using zsh terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.