I recently discovered this method for generating a 9 character password from the linux prompt in bash:< /dev/urandom tr -dc A-Za-z0-9_ | head -c9What is < doing?
Bash Linux random CLI Password generator and `
bash;shell
In case you're wondering, this is just a less common usage of the input redirector. The shell takes the file specified as input and its default behavior is to echo it to stdout.The breakdown of the command you have:< /dev/urandom tr -dc A-Za-z0-9_ | head -c9<: Input redirector. Shell echoes contents of file (/dev/urandom)tr: from tr --help:Translate, squeeze, and/or delete characters from standard input,  writing to standard output.The options -dc are equivalent to --delete --complement, which means to delete the complement of the following set of characters, i.e. all characters NOT in the set. That excludes non alphanumeric & underscore characters in your example.head: print the first few lines of something (default 10). the -c9 switch tells it how many bytes to print instead of lines.Put it all together and you get, print me the first 9 alphanumeric or underscore bytes from /dev/urandom. :)