Revealing Wi-Fi Secrets: Accessing Passwords for Connected Networks in Windows/Linux

Revealing Wi-Fi Secrets: Accessing Passwords for Connected Networks in Windows/Linux

09:24, 16.04.2024

Article Content
arrow

  • Windows
  • Linux
  • To sum up

While the standard graphic interfaces of Windows and Linux are rather designed for regular users, the functionality of both systems is not limited by the features offered within the graphic interfaces. Many helpful features are somewhat concealed and can only be accessed via the command line interface. Today, we want to reveal one of these secrets and show you, how you can access Wi-Fi passwords for connected networks in both Windows and Linux via the command line.

Windows

In Windows, the command line prompt is accessed through the cmd.exe. Many potentially useful features that haven’t been introduced in the GUI, can be accessed via this interface. In particular, if you have ever looked for a handy way to display all the passwords of Wi-Fi networks your device is and has ever been connected to, then cmd is exactly what can help you with it.

Before exploring how to use it for this task, it’s worth understanding how Windows records the networks you’ve connected to. Basically, Windows saves the network in the form of corresponding WLAN profiles which are then stored together with all the necessary details. Using appropriate commands will allow you to see the details on all the networks you’ve ever connected to.

  • Run cmd as admin.
  • Run the command:
netsh wlan show profile

It will display all stored Wi-Fi network connections.

revealing wi-fi secrets: accessing passwords for connected networks in windows/linux

  • Copy the name of the WLAN profile that you want to learn more details about. Use the command netsh wlan show profile *your WLAN profile* key=clear inserting this name instead for *your WLAN profile*. For example:

netsh wlan show profile Traven key=clear

revealing wi-fi secrets: accessing passwords for connected networks in windows/linux

If a password is what interests you among other things, you can see it in Key content which you can find in the security section.

The interface can also be used to delete unneeded profiles. For this, type:

netsh wlan delete profile name=”ProfileName”

Linux

Similarly to Windows, in Linux WLAN profiles are stored and can be accessed through the terminal.

  • Go to etc/NetworkManager/system-connections/
    cd /etc/NetworkManager/system-connections/
    This is the folder where WLAN profiles are stored.
  • Enter ls -a to see all the networks stored on your PC, including those hidden ones which is provided by the -a flag standing for “all”. Pick up the name you want to figure out more about and enter sudo cat WIFI_SSID_Name. The password of the network is to be found under psk=...

You can get detailed information about the files in the directory by typing sudo ls -l /etc/NetworkManager/system-connections/. Pay attention to -l, as it instructs the command to provide long-form information about the files and directories including file permissions, owner, group, file size, modification time, and the file or directory name.

A given network can be also removed with the command:

sudo rm /etc/NetworkManager/system-connections/NETWORK_NAME 

To sum up

This is all you need to know to see the information about the Wi-Fi networks your device has ever connected whether it runs Windows or Linux operating systems, including the passwords you were probably wondering how to find for a long time. Besides that the interface can be used to perform various operations on existing profiles, among other things removal.

The use of the command prompt is pretty handy also because it works the same way on all systems. While different releases and versions of an OS can have significant differences when it comes to graphic interface, and you’ll have to spend time figuring out where this or that feature is to be found, by Googling or by relying on your intuition, the method described works the same regardless. We hope that the instructions provided were clear enough and wish you good luck. Thank you for your time!

views 3m, 6s
views 2
Share

Was this article helpful to you?

VPS popular offers

Other articles on this topic

How to modify hosts file
How to modify hosts file
cookie

Accept cookies & privacy policy?

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the HostZealot website.