How to view the password for a Wi-Fi connection in Linux
August 3, 2024
Table of contents
1. Is it possible to view the password for a Wi-Fi network in Linux
2. How to view a Wi-Fi password in Linux Mint (Cinnamon)
3. How to view a Wi-Fi password in Ubuntu and Kali Linux (GNOME 3)
4. How to view a Wi-Fi password in Xubuntu (Xfce)
5. How to view the Wi-Fi password in Kubuntu and Manjaro (KDE)
6. How to open the Connection Editor window (Network Connections) in the command line
7. In which files does Linux store Wi-Fi passwords
Is it possible to view the password for a Wi-Fi network in Linux
You have been using a computer for a long time that automatically connects to a Wi-Fi Access Point and you no longer remember the password. But you have a new device and you need to know the Wi-Fi password to connect it to the Access Point.
You need to go to the web page with the router settings (to do this, you need to remember its IP address and the password for the router admin panel) and view the Wi-Fi password there. But is it possible to somehow speed up this process and view the Wi-Fi password on a computer that is already connected to a wireless network?
Yes, in Linux, the Wi-Fi connection password is stored in unencrypted form (plain text) and any user with access rights to connect to wireless networks can view the Wi-Fi password.
This instruction will show how to find out the Wi-Fi password in Linux on various distributions.
Moreover, using this instruction, you can view passwords for both Wi-Fi networks within reach and for wireless access points to which you have not connected for a long time.
How to view a Wi-Fi password in Linux Mint (Cinnamon)
Click on the “Network Manager” applet and select “Network Connections”.
Or, in the command line, run the command:
nm-connection-editor
Select the network for which you want to view the password and then click the gear.
In the window that opens, switch to the “Wi-Fi Security” tab.
Check the “Show password” box.
The “Password” field will show the Wi-Fi password for connecting to this wireless network.
How to view a Wi-Fi password in Ubuntu and Kali Linux (GNOME 3)
I have not found how to open the network connection editor in GNOME 3. However, all the necessary packages for viewing the password of Wi-Fi connections in GNOME 3 are already available. But you need to start by opening the console (terminal).
In the command line, run the command:
nm-connection-editor
Note the Wi-Fi networks in the window that opens:
Select the network for which you want to view the password and then click the gear.
In the window that opens, switch to the “Wi-Fi Security” tab.
Check the “Show password” box.
The “Password” field will show the Wi-Fi password for connecting to this wireless network.
How to view a Wi-Fi password in Xubuntu (Xfce)
Right-click on the network connections icon (this can be a patch cord or a wireless network) and select “Edit Connections…”.
Select the network for which you want to view the password and then click the gear.
In the window that opens, switch to the “Wi-Fi Security” tab.
Check the “Show password” box.
The “Password” field will show the Wi-Fi password to connect to this wireless network.
If you do not have nm-connection-editor installed on your system, you can install this program, as this program works in Cinnamon, Mate, GNOME 3, KDE and Xfce.
To install nm-connection-editor on Debian-based distributions (Ubuntu, Kali Linux, Linux Mint), run the command:
sudo apt install network-manager-gnome
To install nm-connection-editor on Arch Linux-based distributions (Manjaro, BlackArch), run the command:
sudo pacman -S nm-connection-editor
After installing this program, you can quickly proceed to setting up network connections, including viewing their password, by running in the command line:
nm-connection-editor
How to view the Wi-Fi password in Kubuntu and Manjaro (KDE)
The KDE desktop environment can be used by Manjaro, Kali Linux, Kubuntu and other distributions.
Right-click on the “Network Connection” applet and select “Configure Network Connections”.
In the Wi-Fi section, select the network for which you want to view the password.
Switch to the “Wi-Fi Security” tab.
Click the eye icon “Show or hide password”.
The “Password” field will display the Wi-Fi password for connecting to this wireless network.
You can optionally install nm-connection-editor, as this program works in Cinnamon, Mate, GNOME 3, KDE and Xfce.
To install nm-connection-editor on Debian-based distributions (Ubuntu, Kali Linux, Linux Mint), run the command:
sudo apt install network-manager-gnome
To install nm-connection-editor on Arch Linux-based distributions (Manjaro, BlackArch), run the command:
sudo pacman -S nm-connection-editor
After installing this program, you can quickly proceed to configuring network connections, including disabling them, by running in the command line:
nm-connection-editor
How to open the Connection Editor window (Network Connections) in the command line
With all the variety of distributions and desktop environments, in all Linux OS we used the same program with a graphical interface. Sometimes this program can be opened using the Network Manager → Network Connections applet, but sometimes there are no links to it in the graphical interface.
In any case, you can use the command line to open the desired application as quickly as possible:
nm-connection-editor
This command works in most distributions.
The nm-connection-editor program works in Cinnamon, Mate, GNOME 3, KDE and Xfce. Some of these desktop environments may already have the program pre-installed.
If you have a different desktop environment, you can try installing this program and using it.
To install nm-connection-editor on Debian-based distributions, run the command:
sudo apt install network-manager-gnome
To install nm-connection-editor on Arch Linux-based distributions, run the command:
sudo pacman -S nm-connection-editor
After installing this program, you can quickly proceed to configuring network connections, including deactivating them, by running in the command line:
nm-connection-editor
In which files does Linux store Wi-Fi passwords
Files with network connection settings are located in the /etc/NetworkManager/system-connections/ directory. If you want, you can open these files and view the password without using additional programs.
Open the file with the settings of the Wi-Fi connection you are interested in and in the section
[wifi-security]
Find the line that begins with “psk” (means pre-shared key (PSK)). For example:
psk=0859329881
The part of the line after the equal sign is the Wi-Fi network password.
Note: KDE Plasma can use kdewallet to store passwords, including for connecting to wireless networks. In this case, use the KWalletManager application to manage and view passwords.
Related articles:
- How to prioritize Wi-Fi connections in Linux (100%)
- How to disable automatic Wi-Fi connection without deleting settings in Linux (100%)
- How to delete Wi-Fi network settings in Linux (100%)
- How to migrate from X11 to Wayland? (64.5%)
- How to prevent NetworkManager from managing a specific interface? (SOLVED) (58%)
- How to set up automatic login in Linux with GDM (RANDOM - 50%)