How to View Saved WiFi Passwords on Debian 10

Whenever we connect to a WiFi network, we enter the password, and if we have to use this network on a regular basis, we simply check the “connect automatically” option for future use. However, we rarely note down the password manually somewhere in a file for future reference. The problem arises when we need the password again, for example when a visitor asks for it. Fortunately, our Debian system saves this password, and all the connection configurations, for all the wireless connections you ever connected to. These are referred to as your “known” wireless connections. These passwords and other configurations can be easily retrieved both through the Debian command line and the graphical user interface.

In this article, we will describe two ways for you to find the saved passwords for your wireless connections:

  • Through Debian Settings Utility(UI)
  • Through the Debian’s Terminal application (command line)

We have run the commands and procedures mentioned in this article on a Debian 10 Buster system although they are applicable to slightly older versions of Debian as well.

View Saved WiFi passwords through the Debian’s Settings Utility (UI)

The Debian Settings utility lets you manage your network connections, including the wireless ones. In order to fetch the password for a wireless connection, we will be using the WiFi view in the Settings utility.

You can open this view from the following three methods:

1. Enter the WiFi keyword in the application launcher search bar as follows:


Then click on the Wi-Fi search result. This will open the Settings utility. Click on the Wifi tab to move to the Wi-Fi view.

2. Click on the downward arrow located at the top-right corner of your Debian desktop.

Then click the settings icon, as shown above, from this menu. This will open the Settings utility which you can use to access the Wi-Fi tab.

3. Click on the downward arrow located at the top-right corner of your Debian desktop.

Network widget

Then click on the name of the connected WiFi connection and select Wi-Fi Settings from the sub-menu. This will open the Settings utility in the Wi-Fi view.

In case no WiFi connection is connected, click on the “Wi-Fi Off” option from the menu.

This is how the Wi-Fi view looks like in the Setting utility:

WiFi Settings

Here, click the settings icon adjacent to the “known” connection whose password you want to fetch. A known connection is the one you have ever connected to. This will open the Details of that WiFi connection. Click on the Security tab to view the security settings:

Show Password

Here, you will be able to see the Password field. By default, the password is kept confidential in asterisks form. Select the Show Password option in order to view the password in an alphanumeric format as follows:

WiFi Password shown in cleartext

This is how you can fetch the password of any Wi-Fi connection whose details are saved on your Debian.

View Saved WiFi passwords through the Debian’s Terminal application (command line)

For a Terminal-savvy person, the Debian command line has a solution to all the administrative and configuration related problems. In fact, the command line gives a greater control to a Debian admin to make/view minute configuration details.

Anyways, let us see how we can make use of the command line to fetch saved passwords for our WiFi connections. The configuration details about your know wireless/WiFi connections are saved in the /etc/NetworkManager/system-connections directory. Individual configuration files are maintained for all your WiFi connections here.

Open your Debian command line, the Terminal, through the Debian application launcher search bar as follows:

Open the Terminal

Then enter the following command as sudo:

$ sudo grep psk= /etc/NetworkManager/system-connections/*

Get saved WiFi passwords from NetworkManager config files

The purpose of this command is to fetch the psk(password) value from the respective WiFi connection configuration files. Since only an authorized user is allowed to view/change the content of these files, you need to run the command as sudo.

This is how a wireless connection file looks like:

WiFi Config File

The psk value corresponds to the saved password for the WiFi connection that you are looking for.

So these were two ways to fetch saved password for your WiFi/Wireless connections. You can now share them with visitors so that they can use the WiFi too.