Last Updated: May 10, 2016
·
213
· dangtunglam

BASH - generate password randomly in CLI

  • openssl: openssl rand -base64 <length>. Ex:
$ openssl rand -base64 10
SamHRPdw6uPrvg==
  • with date command:
$ date +%s | md5sum | head -c 20 ; echo
e08ee2cdcd31cab6b9fc

echo to create new line