Install pwgen on Raspberry Pi

Install pwgen on Raspberry Pi

The pwgen is a command line tool that allows to generate random passwords. This tool is designed to generate secure passwords that can be easily memorized by humans.

This tutorial explains how to install pwgen on Raspberry Pi.

Use SSH to connect to Raspberry Pi. Update the package lists and install pwgen by using the following commands:

sudo apt update
sudo apt install -y pwgen

Now simply type the pwgen command:


By default, pwgen generates 160 passwords which are 8 characters in length.

je2quieP Eesho3oh ooNegh0a eiBee3oo rua3esaH CaiH2jay ahK3Oeyo cu3aiXoo
iugh8ohS zohf9Oe7 Geito4iP deR9zaez Voo6aiph ohf9Quei UCoo7amo eW9xeecu
utu6OhJa aeH3Aice Uchie5eu GoK3faij Ein4ieGu OajieX9e iege4Ohn OeShi2na

Password length can be provided as first argument:

pwgen 12
xoob9gu4NieN bu2uBai6eita chuasi7Yai3v Heu3ohgheib9 Shohn0bah7ae ien4Ohcuojoo

We can also provide number of passwords to generate as second argument:

pwgen 8 1

It generate only one password with length of 8 characters:


By default, pwgen includes at least one number and one capital letter in the password. We can use additional options to generate password without numbers or capital letters:

pwgen 8 1 --no-numerals --no-capitalize

By default, special characters not included in the password. We can use --symbols option to include at least one special character.

pwgen 8 1 --symbols

If you wish to completely remove pwgen, use the following command:

sudo apt purge --autoremove -y pwgen

Leave a Comment

Cancel reply

Your email address will not be published.