WiFi Password Recovery on Ubuntu Desktop: Step-by-Step

Ever had someone ask for your WiFi password and you blank? Or you set up a new device and can’t remember the key you typed months ago? Don’t worry — Ubuntu keeps all your saved WiFi passwords safe and sound. In this guide, I’ll show you how to dig them out, whether you prefer clicking around in the GUI or typing commands in the terminal. By the end, you’ll be able to recover any WiFi password your Ubuntu machine has ever connected to.


This guide is for anyone running Ubuntu Desktop (18.04 or later) with a standard Network Manager setup. We’ll cover two main methods: the graphical way via Settings or network connections app, and the command-line way using nmcli or reading config files. No extra software needed — everything’s built right in. Let’s get started!


What You’ll Need


  • An Ubuntu desktop computer (connected to the network you want to recover, or at least have saved its profile).
  • Sudo/administrator access (you’ll need your admin password to view connection files).
  • Basic familiarity with the terminal (optional but helpful for the command-line method).


Step 1: Recover WiFi Password via GUI (Settings)


The easiest way for most users is through the Settings app. Here’s how:


  • Click the network icon (top-right corner) and select ‘Settings’ or open System Settings from the app menu.
  • In Settings, go to ‘Wi-Fi’ on the left panel.
  • Click the gear icon next to your connected network (or select a saved network from the list).
  • In the network details window, switch to the ‘Security’ tab.
  • Check the box ‘Show password’ to reveal the WiFi password in plain text.


That’s it! The password appears right in the password field. You can copy it or write it down. This method works for the currently connected network. If you need a password for a previously saved but not currently active network, use the ‘Known Networks’ list in the Wi-Fi settings, then click the gear icon for that network.


wifi password recovery for ubuntu desktop Ubuntu desktop Wi-Fi settings security tab show password checkbox

Step 2: Recover WiFi Password via Network Manager Connections App


Another graphical method uses the Network Manager connection editor, which may not be installed by default. If you prefer a more detailed view, install it first:


Then launch it from the app menu (search ‘Network Connections’) or run ‘nm-connection-editor’ in the terminal. In the window:


  • Select the WiFi connection you want to recover and click the gear icon.
  • Go to the ‘Wi-Fi Security’ tab.
  • Check the ‘Show password’ box to reveal the password.


This method shows all saved connections, not just the active one. Note that if you’re using internal links, you can also check our detailed guide on


for more tips.


wifi password recovery for ubuntu desktop Ubuntu Network Manager connection editor Wi-Fi Security tab show password

Step 3: Recover WiFi Password via Command Line (nmcli)


If you’re comfortable with the terminal, nmcli can show passwords quickly. First, list your saved connections:


Find the name of the WiFi network (SSID). Then run:


Or, to get only the password without extra info:


Replace ‘YourSSID’ with the actual network name. The ‘-s’ flag ensures passwords are shown (if they were saved with secrets). If the password doesn’t appear, you may need to read the configuration file directly (Step 4).


wifi password recovery for ubuntu desktop Ubuntu terminal nmcli command showing wifi password output

Step 4: Directly Read the Network Manager Config File (Advanced)


Network Manager stores each connection profile as a file in /etc/NetworkManager/system-connections/. These files contain the WiFi password (psk) in plain text after you’ve connected. To view one:


Look for a line starting with ‘psk=’. The value after the equals sign is the password. If the file doesn’t exist, the connection might be stored in a different format (older versions used .nmconnection files, but some use .conf).


Note: Some systems encrypt the psk value using the ‘psk-flags’ setting. If you see a line like ‘psk-flags=1’, the password is stored in a keyring and not directly readable. In that case, use the GUI method or nmcli with secrets.


wifi password recovery for ubuntu desktop Ubuntu terminal cat command showing network manager config file with psk password

Common Pitfalls


  • **Sudo required**: The connection config files are owned by root. Always use sudo to read them; otherwise you’ll get ‘Permission denied’.
  • **Special characters in SSID**: If your network name contains spaces or special characters, enclose it in quotes (e.g., “My WiFi”) in terminal commands.
  • **Password hidden by keyring**: Some Ubuntu setups store passwords in the GNOME keyring instead of plain text. Use the GUI methods or install seahorse to browse the keyring (search for ‘Passwords and Keys’).


Where to Next?


Now that you’ve recovered your WiFi password, why not explore more? Check out our guides on


for macOS and Linux, or dive into


for Windows, Mac, and Android. If you’re managing multiple networks, our “WiFi Password Recovery for Network Admins” might come in handy. Happy surfing!

Leave a Reply

Your email address will not be published. Required fields are marked *