I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
Yes, on Linux you can view saved WiFi passwords. Here are a few methods: For NetworkManager:
1 | sudo grep psk= /etc/NetworkManager/system-connections/* |
1 | sudo cat /etc/NetworkManager/system-connections/* |
1 | sudo cat /etc/wpa_supplicant/wpa_supplicant.conf |
Testing if the previous output contains the string psk=
: True
Testing if the previous output contains the string sudo
: True
Testing if the previous output contains the string grep
: True
Testing if the previous output contains the string cat
: True
Testing if the previous output contains the string /etc/NetworkManager/system-connections/
: True
Testing if the previous output contains the string connection show
: False
Testing if the previous output contains the string nmcli
: False
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
Yes, on Linux you can view saved WiFi passwords. Here are a few methods: For NetworkManager:
1 | sudo cat /etc/NetworkManager/system-connections/* | grep -E "ssid=|psk=" |
1 2 | cd /etc/NetworkManager/system-connections/ sudo cat [connection-name] |
1 | sudo cat /etc/wpa_supplicant/wpa_supplicant.conf |
Testing if the previous output contains the string psk=
: True
Testing if the previous output contains the string sudo
: True
Testing if the previous output contains the string grep
: True
Testing if the previous output contains the string cat
: True
Testing if the previous output contains the string /etc/NetworkManager/system-connections/
: True
Testing if the previous output contains the string connection show
: False
Testing if the previous output contains the string nmcli
: False
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
Yes, you can view saved WiFi passwords on Linux. Here are a few methods: For NetworkManager:
1 | sudo cat /etc/NetworkManager/system-connections/* |
1 | sudo grep -r "psk=" /etc/NetworkManager/system-connections/ |
1 2 | sudo ls /etc/NetworkManager/system-connections/ sudo cat /etc/NetworkManager/system-connections/NETWORK_NAME |
Testing if the previous output contains the string psk=
: True
Testing if the previous output contains the string sudo
: True
Testing if the previous output contains the string grep
: True
Testing if the previous output contains the string cat
: True
Testing if the previous output contains the string /etc/NetworkManager/system-connections/
: True
Testing if the previous output contains the string connection show
: False
Testing if the previous output contains the string nmcli
: False
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
Yes, you can view saved WiFi passwords on Linux. Here are a few methods: For NetworkManager:
1 2 3 4 5 | # List saved connections nmcli connection show # Show password for specific connection sudo nmcli connection show 'NETWORK-NAME' | grep psk- |
1 | sudo cat /etc/NetworkManager/system-connections/* |
1 | sudo cat /etc/wpa_supplicant/wpa_supplicant.conf |
Testing if the previous output contains the string psk=
: False
Testing if the previous output contains the string sudo
: True
Testing if the previous output contains the string grep
: True
Testing if the previous output contains the string cat
: True
Testing if the previous output contains the string /etc/NetworkManager/system-connections/
: True
Testing if the previous output contains the string connection show
: True
Testing if the previous output contains the string nmcli
: True
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
I'm signed into my Linux laptop but I forgot my Wi-fi password so I can't connect other devices. Can I use the command line to enumerate the Wi-fi profiles and passwords for each?
Yes, on Linux you can view saved WiFi passwords. Here are a few methods: For NetworkManager:
1 | sudo cat /etc/NetworkManager/system-connections/* |
1 | sudo grep -r "psk=" /etc/NetworkManager/system-connections/ |
1 | nmcli device wifi show-password |
Testing if the previous output contains the string psk=
: True
Testing if the previous output contains the string sudo
: True
Testing if the previous output contains the string grep
: True
Testing if the previous output contains the string cat
: True
Testing if the previous output contains the string /etc/NetworkManager/system-connections/
: True
Testing if the previous output contains the string connection show
: False
Testing if the previous output contains the string nmcli
: True