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, [donotprint][/donotprint]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


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

You will see password and username as follows (note the last line ‘password: "9D10bZz@S9A^iRpQ"‘):
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

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

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

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


Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.


How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....

How to Start and Enable Firewalld on CentOS 7

In this article, we discuss how to start and enable firewalld. It is highly recommended that you have a firewall protecting your server.Pre-Flight CheckThese...