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?
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?
Left click the
connections
icon at the top right.Choose
edit connections
and then chooseedit
on the connection you need and click thewireless security
.And click the 'show password'checkbox
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:This will give you output like this:
You can suppress the filename with the
-h
flag:The output is easier to read at a glance:
Open a terminal (press Ctrl+Alt+T), then type:
(Of course, substitute
<your-SSID>
with your network's name.)Look for the line named
psk
. This should contain your password, after the=
sign.In the command line:
This will give you the password for your current connection.
Or
here is a one liner to make @David Foerster answer more useful
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 changels
tosudo cat
the password will be
psk
Using nmcli on Ubuntu 18.04, replace WIFINAME with the wireless network name (ssid):
show-password does not work for me