How to View Saved Wi-Fi Passwords on Linux

Wi-Fi hotspots are everywhere, in our homes, public buildings, and cafes. This makes Wi-Fi one of the most common ways to connect to the internet from your computer.

Did you know that on Linux, you can easily check all the Wi-Fi networks that you have previously connected to? You can even view saved Wi-Fi passwords on Linux using nmcli.

4

What Is nmcli?

The nmcli (short for “NetworkManager Command-Line Interface”) utility is a powerful command-line tool for controlling NetworkManager, a daemon used for managing network settings and connections on Linux.

You can use nmcli for general management of Wi-Fi networks, such aslisting and connecting to a Wi-Fi networkfrom your Linux PC. It is also particularly useful in networking scripts or on servers that do not have a GUI.

wifi networks, security, and login

Installing nmcli on Linux

Most distros have nmcli installed by default, but in case it’s not installed on yours, here’s how to proceed.

To install nmcli on Debian-based distros such as Ubuntu, MX Linux, and Pop!_OS, use the APT package manager:

nmcli command listing all wifi networks on a linux pc

On RHEL and similar distros such as Alma Linux, Fedora, Rocky Linux, etc., you canuse the DNF package manageras follows:

On Arch Linux-based distros, it’s possible to install nmcli using Pacman:

nmcli command showing wifi password

Viewing Saved Wi-Fi Networks Using nmcli

To view information on all the Wi-Fi networks you’ve previously connected to on your PC, run the following command:

If you do not filter with grep, nmcli lists all the networks including wired networks, bridged connections, and VPN connections.

mesh-wifi-home

The output for the preceding command will look like this:

The Wi-Fi name or SSID (Service Set Identifier) is listed in the first column, followed by the UUID (Universally Unique Identifier), then the network type (Wi-Fi in this case). Finally, the last column shows the device type of the network.

Viewing Saved Wi-Fi Passwords on Linux

You’ll needelevated privileges on Linuxto view saved passwords with nmcli.

you’re able to check the password of a known Wi-Fi network using:

…whereWiFiNameis the name of the Wi-Fi network you’re interested in.

For example, to view the password of a Wi-Fi network named “iPhone,” run the following:

The password for the Wi-Fi network iPhone is listed as “test1234.”

In case you’re wondering where nmcli stores its Wi-Fi configuration files, it’s in the/etc/NetworkManager/system-connectionsdirectory.

Improve Your Home Network With Mesh Wi-Fi

nmcli is a great utility for managing network settings and connections on your Linux PC.

If you are having Wi-Fi connection problems in your home or office location, you can purchase a mesh Wi-Fi device for better connectivity.

If you’ve been suffering Wi-Fi dead zones around the house, then one of these mesh Wi-Fi networks may be just what you need.

You can block out the constant surveillance and restore your privacy with a few quick changes.

Your iPhone forgets what you copy, but this shortcut makes it remember everything.

Sometimes the smallest cleaning habit makes the biggest mess.

One casual AI chat exposed how vulnerable I was.

My foolproof plan is to use Windows 10 until 2030, with the latest security updates.

Technology Explained

PC & Mobile