How to recover a forgotten Wi-Fi password on Windows, Mac and Linux computers.
Imagine this scenario – your computer is connected to a Wi-Fi network but you don’t remember the password you used to connect to this particular WiFi network before. Maybe you forgot the password over time, or maybe the network administrator set up the Wi-Fi connection for you without providing you with the actual password.
Now, you need to connect a second device like your mobile phone to the same Wi-Fi network, but you are not sure how to recover the password.
Recover a forgotten Wi-Fi password
In this case, you can request a password from the Wi-Fi owner or, a simpler option, open a command prompt on your computer to retrieve the saved Wi-Fi password in one easy step. This technique works on both Mac and Windows computers.
Find WiFi password in Windows
Open a command prompt in administrator mode. Type it cmd
In the Run box, right-click the Command Prompt icon and choose Run as administrator). Now enter the following command and press enter to see the wifi password.
netsh wlan show profile name=labnol key=clear
Remember to replace labnol
With the name of your wireless SSID (this is the name of the Wi-Fi network that you connect to your computer). The password will appear under the Security Settings section (see screenshot).
If you only want to see the password and not other information, use the find command:
netsh wlan show profile name=labnol key=clear | findstr Key
If you don’t see a password, you haven’t opened a Command Prompt window as an administrator
Show WiFi password in Mac OS
If you’re using a Mac and have connected to a Wi-Fi network before but can’t remember the password, you can easily retrieve the password from Keychain. macOS uses Keychain to store various login credentials, including Wi-Fi network passwords.
Open Spotlight (Cmd+Space) and type terminal
To open a Terminal window on your Mac. Now type the following command and press enter (replace labnol with your wifi name).
security find-generic-password -wa labnol
To access OS Keychain you will be prompted to enter your admin username and password and the Wi-FI network password will be displayed in plain text on the screen.
Reveal WiFi Password in Linux
The process of recovering Wi-Fi password in Linux is similar to the method used in macOS. Open a Terminal window and type the following command to view the Wi-Fi password.
sudo cat /etc/NetworkManager/system-connections/labnol | grep psk=
Remember to replace labnol with the wireless name (SSID) of your current Wi-Fi network. Value of area psk
is your wifi password.
If you don’t know the exact name of the Wi-Fi network, you can use the following command to list all stored network configurations and their associated passwords:
sudo grep psk= /etc/NetworkManager/system-connections/*
Start WLAN AutoConfig (Wlansvc Service)
If you are using this technique to recover WiFi password on a Windows computer but getting an error – “Wireless AutoConfig Service (wlansvc) is not running” – here is a simple solution:
Click the Windows Start button and type services.msc
In the Run box to access Windows Services. Go to WLAN Autoconfig service here and make sure the status is running. Otherwise right click on the WLAN AutoConfig service, select Properties and go to Dependencies. Check all dependencies to make sure they are all running.