How to use
The pwgen format is: pwgen <options> <password_length> <number_of_passwords>
Commonly used options for pwgen are:
-1 Output one password per line
-c must contain uppercase letters
-n must contain numbers
-s random password
More interesting parameters of the pwgen command:
-0: The password does not contain numbers.
-B, --ambiguous: The password does not contain confusing characters, such as "1" and "l", "0" and "O".
-v, --no-vowels: The password does not contain vowels or numbers that may be mistaken for vowels.
Let’s look at some specific examples:
1. Use the command pwgen to generate a unique, random password of 10 characters in length.
Generate a unique random password
Generate several sets of unique random passwords with a length of 50 characters in one go!
Generate multiple sets of random passwords
2. You can also use makepasswd to generate a unique random password of a given length each time. Before you play with the makepasswd command, make sure you have it installed. If not, try using the Apt or YUM package manager To install the makepasswd package.
Generate a random password with a length of 10 characters. The default length of the password generated by this command is 10.
Use makepasswd to generate unique passwords
Generate a random password of 50 characters in length.
Generate a password of length 50
Generate 7 random passwords of 20 characters in length.
it works
it works
it works