Skip to content

Instantly share code, notes, and snippets.

@ooooak
Created July 31, 2015 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ooooak/7778d5463974fa10f9d4 to your computer and use it in GitHub Desktop.
Save ooooak/7778d5463974fa10f9d4 to your computer and use it in GitHub Desktop.
[unix]Get password from connected wifi connection linux
# first we need the SSID
iwconfig | grep "ESSID\|SSID"
# now run this
sudo cat /etc/NetworkManager/system-connections/YOUR_SSID | grep "psk="
Example
------------------
> iwconfig | grep "ESSID\|SSID"
wlan0 IEEE ___ ESSID:"TP-Link"
> sudo cat /etc/NetworkManager/system-connections/TP-Link | grep "psk="
psk=password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment