I want to find the password for the wireless network that I am currently connected to (and I entered the password when connecting to the network). How can I do this in Ubuntu?

  • 1
    I went to "connection information" and didn't find the password. – Anderson Green Jun 27 '12 at 20:18
  • 2
    almost there... you need the edit connections below that ;) – Rinzwind Jun 27 '12 at 20:22

Left click the connections icon at the top right.

Choose edit connections and then choose edit on the connection you need and click the wireless security.


And click the 'show password'checkbox


| improve this answer | |
  • Ah, my command-line ways were betrayed by my solution :) I like this one better, FWIW. – roadmr Jun 27 '12 at 22:44
  • 1
    Well I like both with a preference to command line @roadmr :D – Rinzwind Jun 28 '12 at 7:17

If you want to do this with the command line, the wireless network configuration files are saved in the /etc/NetworkManager/system-connections/ directory. You can get them all at once like this:

sudo grep -r '^psk=' /etc/NetworkManager/system-connections/

This will give you output like this:


You can suppress the filename with the -h flag:

sudo grep -hr '^psk=' /etc/NetworkManager/system-connections/

The output is easier to read at a glance:

| improve this answer | |
  • 1
    This is working charmly – Wong Jia Hau Nov 14 '18 at 7:18

Open a terminal (press Ctrl+Alt+T), then type:

sudo cat /etc/NetworkManager/system-connections/<your-SSID>

(Of course, substitute <your-SSID> with your network's name.)

Look for the line named psk. This should contain your password, after the = sign.

| improve this answer | |

This will give you the password for your current connection.

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


sudo grep psk= /etc/NetworkManager/system-connections/(YOUR-SSID)
| improve this answer | |

here is a one liner to make @David Foerster answer more useful

MYCWD=`pwd`; cd /etc/NetworkManager/system-connections/ ; sudo grep -e '^psk=' * | less ; cd $MYCWD
| improve this answer | |

you can just type ls /etc/NetworkManager/system-connections/ and it will show the name of your network, so just press the up arrow on keyboard and type the name of your connections and change ls to sudo cat

the password will be psk

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.