Skip to content

Instantly share code, notes, and snippets.

@ik5
Created December 4, 2014 10:07
Show Gist options
  • Save ik5/2efb7baa5144ecfbdf2f to your computer and use it in GitHub Desktop.
Save ik5/2efb7baa5144ecfbdf2f to your computer and use it in GitHub Desktop.
random password generator in shell
genpasswd() {
local l=$1
[ "$l" == "" ] && l=20
tr -dc "A-Za-z0-9_%^&*()\`/[]{}|" < /dev/urandom | head -c ${l} | xargs
}
genpasswd 52
@boazrymland
Copy link

there are also powerful command line generators like "apg" (advanced password generator).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment