Skip to content

Instantly share code, notes, and snippets.

@stschulte
Last active January 22, 2023 19:00
Show Gist options
  • Save stschulte/69fd6612aa7d85da28e985f35e6fc816 to your computer and use it in GitHub Desktop.
Save stschulte/69fd6612aa7d85da28e985f35e6fc816 to your computer and use it in GitHub Desktop.
Generate a password

The following command creates a random password with 29 characters:

LC_ALL=C tr -cd '[:alnum:]' < /dev/urandom|fold -w 29 |head -1

To include special characters:

LC_ALL=C tr -cd '[:graph:]' < /dev/urandom|fold -w 29 |head -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment