pwgen – PWGen is a password generator capable of creating large amounts of cryptographically secure random passwords or passphrases (from word lists). It uses a random pool to gather entropy from user inputs and system parameters as well as text encryption. The default should be fine for most users. For example, to get a 12-character password, use pwgen 12, and the utility will spit out a set of 120 possible passwords from which to choose (six columns, 20 rows).
The passwords generated using this option are not very random. If you use this option, make sure the attacker can not obtain a copy of the file. Also, note that the name of the file may be easily available from the ~/.history or ~/.bash_history file.
pwgen 12 -s1yc
pwgen 14 -B1ycs
pwgen -B -c -N1 -n -s -y
pwgen 12 -1cn