How to see WiFi passwords on Linux

Suppose last time you have visited your friend’s house and connected to his WiFi from your Linux machine and today again, you visited your friend’s house and want to connect to WiFi from your mobile device, but you forgot the WiFi password told by your friend last time. In this article we will see how to see the WiFi passwords on Linux Machines.

1) First of all open the terminal. Press Ctrl + Alt + t to open.

2) Change your directory to:

cd /etc/NetworkManager/system-connections/


3) List all the files using ls command



This will show the list of saved WiFi connections.

4) See the content of the file using cat command and file name as WiFi connection name.

sudo cat wifi-connection-name

Replace wifi-connection-name to the name of WiFi connection saved in the directory.


Here iPhone is previously saved WiFi connection name in my laptop.

Note: For opening this file you need to use sudo.

5) These are the contents of the iPhone file

id means name of the WiFi connection, mac-address, psk means password of WiFi connection.

This is how we can see the passwords of WiFi connections saved on your device.


Leave a Reply

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

Back to top