Generate Random Passwords on the Linux Command Line
Monday, September 1st, 2008Here is a quick one line command to generate a random password from the Linux command line.
# < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c8
This will create an 8 character long password. To make it longer or shorter change c8 to c# (# being whatever number you want).
Another way to go about this is the pwgen command. Simply install pwgen and execute it and it will give you a bunch of random passwords, simply pick one out of the bunch.