Frequently, I’ll use password generator websites to create some pseudo-random string of characters for system accounts, database replication,etc. But sometimes the Internet isn’t readily available … and you can create a decent password right from the Linux command line using urandom.
If you want pretty much any “normal” character, use tr to pull out all of the other characters:
Or remove anything outside of upper case, lower case, and number characters using
Pass the output to head to grab however many characters you actually want. Voila — a quick password.