OS X Password Generator in BASH

Because feeble passwords are weak.

Official Bash Logo: http://j.mp/bash-logo

I love strong passwords. TIL an easy way to create a strong, secure password and have it copied to your clipboard.

Install pwgen (use Homebrew)

$ brew install pwgen

Add the following to your ~/.bash_profile

genpasswd() { pwgen -Bs $1 1 |pbcopy |pbpaste; echo “Has been copied to clipboard”

Reload your profile

$ source ~/.bash_profile

Run it

$ genpasswd 15
Has been copied to clipboard
Not on OS X? Try g20: $ npm i -g g20

Thank you for reading. If you liked this, click the 💚 below so other people will see this here on Medium.

Totally inspired by FreeCodeCamp.com