Get WiFi Password from Command Line

By  on  

I met Guillermo Rauch several years ago in the #mootools-dev room on IRC.  He jumped into the MooTools project and made great things happen; he also coded MooTools' plugins forge.  Since then he's gone on to create amazing things, most recently releasing HyperTerm, an excellent terminal app for Mac.  I was recently browsing his GitHub repo list and found a goldmine of work but one quickly stuck out:  wifi-password.

Have you ever been at a coworking location, a bar or restaurant, or your friend's house and someone asks you for the wifi password?  You don't remember, of course, and the signs posting it are no longer up.  What do you do?  You grab wifi-password!

Once you've cloned wifi-password, you run the utility while you're connected to the network:

./wifi-password

Wait a moment and the wifi password is output to your command line:

Wifi Password

I can think of dozens of instances when this would've done me well.  Being able to retrieve passwords from any app or network is incredibly useful when on the go!

Recent Features

  • By
    An Interview with Eric Meyer

    Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it? At first blush, it was the simplicity of it as compared to the table-and-spacer...

  • By
    How I Stopped WordPress Comment Spam

    I love almost every part of being a tech blogger:  learning, preaching, bantering, researching.  The one part about blogging that I absolutely loathe:  dealing with SPAM comments.  For the past two years, my blog has registered 8,000+ SPAM comments per day.  PER DAY.  Bloating my database...

Incredible Demos

Discussion

  1. Maxime

    You can also just do the following:

    cd etc/NetworkManager/system-connections/
    
    ls -a
    
    sudo cat WIFI_SSID_Name
    

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!