Create random Password in Command Line
Following code yields a random password with 9 characters, alphanumeric, adjust the head -cN for different lengths
< /dev/urandom LC_CTYPE=C tr -dc A-Za-z0-9_ | head -c9
You could as well play with the regex to add some special characters to the mix.
< /dev/urandom LC_CTYPE=C tr -dc A-Za-z0-9_\*-\+ | head -c9
Written by Diego Paladino
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Cli
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#