Skip to content

Instantly share code, notes, and snippets.

@a2gs
Last active July 10, 2019 18:47
Show Gist options
  • Save a2gs/91bada1ab0cdd25bf2512122304f4153 to your computer and use it in GitHub Desktop.
Save a2gs/91bada1ab0cdd25bf2512122304f4153 to your computer and use it in GitHub Desktop.
Linux (bash) password generator
#!/bin/bash
export LC_ALL=C
tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c 18 ; echo
@a2gs
Copy link
Author

a2gs commented May 22, 2019

Or:

  • openssl rand -base64 12
  • < /dev/urandom tr -cd "[:print:]" | head -c 32; echo

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