Press "Enter" to skip to content

quick way to generate passwords under the terminal

Install pwgen package:

apt-get install pwgen

Then run the following command to generate one password of length 15 and include at least one capital letter, one number and one special character:

pwgen -1 -c -n -y 15

Update (2018-09-23):

For even more secure passwords, you should type the command as follows:

pwgen -1 -c -n -y -s 15

From the man page of pwgen:
-s, –secure
Generate completely random, hard-to-memorize passwords.
These should only be used for machine passwords, since
otherwise it’s almost guaranteed that users will simply
write the password on a piece of paper taped to the mon‐
itor…

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.