There are plenty of tools across the internet that will help you generate random passwords. I recommend using a password manager, and many password managers come with a password generator built-in.
I recommend 1Password because it's well designed and is compatible with all major platforms. Password managers are generally reliable for creating secure passwords. As a guide, an 8 character random password usually takes a few days to crack whereas a 10 character password takes years. Obviously the more characters you use the more secure the password (assuming it is completely random).
And best of all, you don't even have to remember your password for each application or website—just the manager's password!
There many, many ways to generate random strings of characters on the command line, but the following is my favorite because it's easy to remember.
date | md5
This will generate a 32 character string that can be used as a password. If you'd like to generate a shorter password, you can use the
head command like this:
date | md5 | head -c 16