Generate a Random String in Linux
It’s not too hard to generate a random number at the command line in Linux. You can use $RANDOM. But if you want to generate a random string, it is a bit more obscure. The best solution I found (after searching for longer than expected) was the following:
openssl rand -base64 30
This technique uses the openssl utility, which I believe is commonly installed on Linux systems. It generates a base-64 string value that is 30 characters long. If you know of a better way to do this, please let me know.