In Linux , Mac and Windows Last updated:
Share on:
Cloudways offers managed cloud hosting for any size business to host a website or complex web applications.

Have you ever faced a situation where you have been using a Wi-Fi network for many months and suddenly realized that you don’t remember its password?

Our systems remember every Wi-Fi password we’ve ever connected to.

That’s how it re-establishes connections with those networks without entering the password again.

Here’s a tutorial on how you can explore the saved password of any network you’ve ever connected to on your Windows, Linux, and macOS.

Let’s get started.


In Windows, you can easily find the Wi-Fi passwords by using the command prompt.

For opening the command prompt, you can go to the search bar and then search for CMD. Don’t forget to run it as an administrator.

Once the command prompt is open, Just run the following command.

netsh wlan show profiles

This command will display all the Wi-Fi network interfaces you’ve ever connected to previously. For example, you can see below these are the Wi-Fi networks I’ve ever connected to.

C:\Users\geekflare>netsh wlan show profiles

Profiles on interface Wi-Fi:

Group policy profiles (read only)

User profiles
    All User Profile     : OPPO A31
    All User Profile     : Jio 2g
    All User Profile     : Redmi
    All User Profile     : AndroidAP8840
    All User Profile     : belkin.637
    All User Profile     : Android GalaxyM-20
    All User Profile     : Free-wifi!
    All User Profile     : OnePlus 7
    All User Profile     : Micromax
    All User Profile     : sunsytesms_Wifi
    All User Profile     : GPONWIFI_C060

And next step is to explore the password of a particular interface. Just use the below command.

netsh wlan show profiles <interface name> key=clear

Here you should provide the interface name for the password to be revealed.

sample output:

C:\Users\geekflare>netsh wlan show profiles Micromax key=clear

Profile Micromax on interface Wi-Fi:

Applied: All User Profile

Profile information
    Version                : 1
    Type                   : Wireless LAN
    Name                   : Micromax
    Control options        :
        Connection mode    : Connect manually
        Network broadcast  : Connect only if this network is broadcasting
        AutoSwitch         : Do not switch to other networks
        MAC Randomization  : Disabled

Connectivity settings
    Number of SSIDs        : 1
    SSID name              : "Micromax"
    Network type           : Infrastructure
    Radio type             : [ Any Radio Type ]
    Vendor extension          : Not present

Security settings
    Authentication         : WPA2-Personal
    Cipher                 : CCMP
    Authentication         : WPA2-Personal
    Cipher                 : GCMP
    Security key           : Present
    Key Content            : 00000CD53

Cost settings
    Cost                   : Unrestricted
    Congested              : No
    Approaching Data Limit : No
    Over Data Limit        : No
    Roaming                : No
    Cost Source            : Default

In the security settings details, you can see the password (Key Content) for the interface I provided.

This is how you can easily find a Wi-Fi password for any interface using the command prompt in windows.


In all Linux distributions,  information of all wireless networks is being stored in the Network manager directory.

To find the saved Wi-Fi passwords using a command line, enter these commands.

cd /etc/NetworkManager/system-connections/

After that, use the list command to show the files in the folder.

ls -a

Network config files will be displayed on the screen after using the command. These config files contain information about each network, including the Wi-Fi SSID, UUID, and Wi-Fi password. Use Cat command or some text editor to open the file and see the password for a specific interface.

cat <Interface name>

This command will show all the information about the Wi-Fi network you have chosen.

Sample Output:

└─# cd /etc/NetworkManager/system-connections

└─# ls -a
GPONWIFI_CO60     Jio2g     

└─# sudo cat GPONWIFI_CO60





In the above output, the PSK (pre-shared key) value is the password for the given Wi-Fi network.


In the macOS also, you can easily find the password for any Wi-Fi interface using the command line. You can launch the terminal by navigating to Applications > Utilities > Terminal.

security find-generic-password -ga Interface-name| grep “password:”

Here, you need to replace the interface name with the Wi-Fi network name you choose. This command reveals the password for the Wi-Fi network you provide.

Conclusion 👩‍💻

If you’ve ever joined a Wi-Fi network, you have that network’s password saved on your system. It doesn’t matter whichever operating system it is. You can use the terminal to access all your saved Wi-Fi passwords.

I hope you found this article very useful in finding the Wi-Fi passwords in different operating systems.

You may also be interested in knowing about the various best Wi-Fi routers for personal and office use.

Share on:
  • Ashlin Jenifa
    Hey there, my name is Ashlin, and I’m a senior technical writer. I’ve been in the game for a while now, and I specialize in writing about all sorts of cool technology topics like Linux, Networking, Security, Dev Tools, Data Analytics, and Cloud…

Thanks to our Sponsors

More great readings on Linux

Power Your Business

Some of the tools and services to help your business grow.
  • The text-to-speech tool that uses AI to generate realistic human-like voices.

    Try Murf AI
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.

    Try Brightdata
  • is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.

    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.

    Try Intruder