This tutorial intends to teach you to View the Saved WiFi Passwords and Check the Connected WiFi Password on Ubuntu Linux from Command Line.
If you are using Wireless connections and you are connecting to the list of WiFi access points, you must save the password for the connection on your Ubuntu server.
For some reason, you may forget the password. So you can follow the steps below to check the WiFi password from the Ubuntu Linux Terminal.
How To Check Connected WiFi Password on Ubuntu Linux?
To complete this guide, you must have access to your server as a non-root user with sudo privileges. For this purpose, you can visit the Orcacore website and check the Ubuntu initial server setup guides. You can use any Ubuntu version like Ubuntu 20.04 and Ubuntu 22.04.
Step 1 – Check Saved WiFi Passwords on Ubuntu
At this point, you can list all the saved connections on your Ubuntu from the Linux terminal. To do this, you must navigate to your /etc/NetworkManager/system-connections/ directory with the command below:
sudo cd /etc/NetworkManager/system-connections/
Then, from the directory run the following command to get all the system connections:
This file includes the WiFi profiles and their details. Each WiFi connection has separate profile entries, which are saved and connected earlier.
You can use the following command to check each WiFi profile:
sudo cat [name of profile]
In the file, you can find the saved password with the option psk under the [wifi-security] section.
Step 2 – Check the Current Connected WiFi Password on Ubuntu
At this point, you can find your current WiFi password that you have connected to it by using the following command:
sudo nmcli device wifi show-password
This command gives you the current connected password with a QR code to share the connection.
That’s it, you are done.
It is recommended to use the Linux Command Line to check your WiFi passwords. So we taught you to View the Saved WiFi Passwords and Check the Connected WiFi Password on Ubuntu Linux from Command Line. It is so easy and just by using some Linux commands you can do it.
Hope you enjoy it. You may be interested in these articles: