This quick tutorial explains the steps to view saved WiFi password in Ubuntu and Other Linux.
If you use wireless connections and frequently connect to a list of WiFi access points, then you tend to save the password for seamless connectivity in Ubuntu and other systems. However, you may forget the password after a certain period. Here’s how you can quickly find it out.
In Linux, there are two ways you can view the passwords – a) via Terminal method and b) GUI method.
The terminal method is the recommended way to view the saved password. Because irrespective of the Linux distribution, desktop – this works.
However, the GUI method differs based on which desktop environment you use. The reason is the system settings dialogs are different in GNOME, KDE Plasma, Xfce, LXQt, etc.
View Saved WiFi Password
Terminal Method (recommended)
Open a terminal and go to the path /etc/NetworkManager/system-connections/ via the following command. And list the profiles.
This path contains the WiFi profiles and their details. Each WiFi connection has separate profile entries, which are saved and connected earlier.
Use the following command to display the contents of the files.
sudo cat [name of profile]
In the file, under [wifi-security], you should find the saved password with key psk. See an example below.
This way, you can easily find out the saved WiFi password via the terminal.
GNOME (used by Ubuntu, Fedora, and others as default)
Open Settings. Then click on WiFi. Under the Visible network, find your WiFi access point (AP) name. Click on the small gear icon beside the AP.
Then go to the Security tab aand click Show password to view the saved password.
Open System Settings. Under Network, click on Connections. Click on the WiFi connection name and go to the WiFi security tab. Click on the small eye icon to find out the saved password.
Xfce doesn’t have any dedicated GUI for finding out the saved password. So follow the above terminal method.
I hope this guide helped you find out the saved password, which you may have forgotten. Cheers.