Using the pwgen utility for password generation

  • Thread starter Deleted member 108694
  • Start date

Deleted member 108694

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
sudo apt install pwgen
for Arch based systems
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:
pwgen --help
For example, the following command will generate one 14 letter password.
pwgen 14 1

The best way to generate a password, in my opinion, is to use the following command:
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

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

Members online