View Saved WiFi password in Ubuntu and Other Linux

2 min


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.

cd /etc/NetworkManager/system-connections/
ls -a
List of WiFi profiles
List of WiFi 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.

View saved password
View saved password

This way, you can easily find out the saved WiFi password via the terminal.

Getting the password via the terminal for the connected access point

If you want to find out the password of your WiFi access point, which is currently connected, then simply run the following command to show it. It will give you the password immediately with a QR code to share the connection. Remember, this should work only on latest series of Linux distributions.

nmcli device wifi show-password
show wifi password via nmcli
show wifi password via nmcli

GUI Method

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.

Wifi Option - GNONE Settings
Wifi Option – GNONE Settings

Then go to the Security tab aand click Show password to view the saved password.

Show saved password in Ubuntu (GNOME)
Show saved password in Ubuntu (GNOME)

KDE Plasma

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.

Show Saved WiFi Password in KDE Plasma
Show Saved WiFi Password in KDE Plasma

Xfce

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.


Arindam

Creator and author of debugpoint.com. Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

7 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments