≡ Menu

How To Find the WiFi Password on Mac OS X

I‘ve MBP 13″ laptop. How can I find out the Wifi password on Mac OS X using command line and GUI options?

OS X stores your WiFI details including password in Keychain password management system. You can use this tool, if you do not remember the password of particular WiFi network on Apple Mac OS X. There are two methods to get the WiFI password as follows:

#1: Display the WiFi Password on Mac OS X Using CLI

You can use the security command. It is a command line interface to keychains and Security framework which stores your WiFI password and other information. Open the Terminal app and type the following command:

security find-generic-password -ga YOUR-ACCOUNT-NAME
security find-generic-password -ga SSID-HERE
security find-generic-password -ga YOUR-WiFi-Access-Point-Name-Here

In this example, find the Wifi password for Iphone4s access point (SSID):

security find-generic-password -ga Iphone4s | grep -i password

OR

security find-generic-password -ga Iphone4s

You will be promoted to enter your own username and password as follows:

Fig.01 Type admin user account and password

Fig.01 Type admin user account and password


You will see password and username as follows (note the last line ‘password: "9D10bZz@S9A^iRpQ"‘):
Fig.02: OS X AirPort network password

Fig.02: OS X AirPort network password

#2: Not a Fan of Command Line Tools?

The System Keychain is a utility which securely stores all passwords and user IDs for a user and lets that user unlock them all with a single master password.

System Keychain Location

  • Open Spotlight to start a search by pressing Command (⌘)-Space bar
  • In the search field type: keychain access
  • Click on Keychain Access

Fig.03: Find the system keychain on OS X Yosemite

Fig.03: Find the system keychain on OS X Yosemite


Next, click on the “login“, select “Password“, and in the search filed type access point name “Iphone4s“:
Fig.04: Searching for Iphon4s access point password

Fig.04: Searching for Iphon4s access point password


Finally, to copy the WiFi password press Shift(⇧) – Command(⌘) – C to copy password to the clipboard. Again you will be promoted to enter admin account username and password:
Fig.05: Type admin user account and password

Fig.05: Type admin user account and password


Once authenticated successfully you can paste the WiFi password in the Terminal app or text editor by pressing Command(⌘)-V:

9D10bZz@S9A^iRpQ
Share this tutorial on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:



{ 4 comments… add one }
  • Tom July 27, 2015, 12:17 pm

    Hey,

    Can I see Ubuntu instructions please?

    • Lars July 27, 2015, 12:43 pm

      cat /etc/NetworkManager/system-connections/ | grep psk

  • ITStaff@CIT July 27, 2015, 12:22 pm

    Don’t suppose anyone has an equivalent for Linux?

  • Sudev July 28, 2015, 10:11 am

    cat /etc/NetworkManager/system-connections/YOUR-WIFI-NAME

    May have to do this as SU or under SUDO

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: