Recover Wi-Fi Passwords Using Linux

Display the contents of configuration files to recover Wi-Fi credentials

Linux stores, if you permit it, the credentials of every Wi-Fi network to which you connect. Accessing stored passwords is as simple as a shell command, but you may need to explore a bit to locate which set of folders corresponds to the network infrastructure your distribution uses.

Cartoonish illustration of a group of smiling people carrying a big key and walking
 alashi/Getty Images

How to Locate Stored Wi-Fi Credentials

Linux supports several networking systems, each of which stores credentials in a different place. Common locations include:

  • /etc/NetworkManager/system-connections/
  • /etc/wicd/wireless-settings.conf

When you find the right folder or file, execute ls to display the list of networks, then execute sudo cat on a specific network name to display its contents.

Some older distributions use the wpa_supplicant system to connect. The location of the configuration file isn't fixed; execute sudo locate wpa_supplicant.conf to identify the correct location, then review the configuration file.

Within the file, look for a section called wifi-security or something equivalent. The password is usually prefixed by psk=. If you connect by Ethernet cable or a virtual network connection (for example, in a virtual machine), you won't see a Wi-Fi setting for the network.

Use a Graphical Tool

Depending on your desktop environment, you may have recourse to the graphical user environment to access stored passwords. Each DE functions differently, so check the DE settings for specific guidance.

Use the Router Settings Page

If you didn't store your Wi-Fi connection credentials, your only option is to connect to the router's control panel to verify the password from there.