Generate a random string from the Linux Command Line

You could use this command from the Linux command line prompt to generate a random 15-character string of letters and numbers:

/usr/bin/gpg --gen-random --armor 1 15 | sed 's/[^[:alnum:]]//g'

The sed statement removes all non-alphanumeric characters from the output generated by the gpg command.

This command comes in handy for generating random passwords for people you do not like.