Using the pwgen utility for password generation

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
2,217
Reaction score
1,625
Credits
16,370
The pwgen utility helps you in generating strong and easily memorable passwords in seconds. You can install this utility through the following command for Debian/Ubuntu
Code:
sudo apt install pwgen
for Arch based systems
Code:
sudo pacman -S pwgen
or you can search for pwgen through the Synaptic Package Manager if you have that installed
The pwgen help contains many options through which you can customize the password. Here is how to use this command:
pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]
And, here is how you can see the help:
Code:
pwgen --help
For example, the following command will generate one 14 letter password.
Code:
pwgen 14 1
1672591782017.png

The best way to generate a password, in my opinion, is to use the following command:
Code:
pwgen -ys 16 1
I have used two options for pwgen in this command; the y flag tells pwgen to generate a secure password and s tells it to come up with a password that includes symbols
1672591832994.png

As you can see the above password is 16 digits long, quite complicated and therefore secure, then use a program like KeePassXC to store your passwords
 


KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
9,093
Reaction score
7,713
Credits
74,241
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top