If you need a tool to generate random secure passwords, here I show you some command line and graphical applications.

Table of Contents

CLI

pwgen

Available on official repositories of Arch Linux, Debian and other systems. Its use is pretty simple:

pwgen [<options>] <number_characters> <number_passwords>

To generate two passwords with 12 characters each:

pwgen 12 2

Some available options are:

  • y, --symbols: include at least one special symbol.
  • -B, --ambiguous: don’t include ambiguous characters.
  • -n, --numerals: include at least one number.

Run pwgen --help for more info about other available parameters.

apg

apg (available on Debian, AUR and other system repositories) works similar to pwgen but it requires explicit parameter names to define the number of passwords and their length.

apg -m 12 -x 12 -n 1
  • -m <number>: minimum password length.
  • -x <number>: maximum password length.
  • -n <number>: how many passwords to generate.

Run apg -h for more info.

GUI

Password

Available on Flatpak, this password calculator and generator can calculate unique strong passwords from a combination of an alias and a passphrase (so you don’t need a password manager). It can also generate random passwords.

Password

Password

Password

Pasgen

This simple password generator is available on the ElementaryOS AppCenter, but you can also install it with Flatpak (using ElementaryOS repository):

flatpak install --user https://flatpak.elementary.io/repo/appstream/com.github.alexkdeveloper.pasgen.flatpakref

Pasgen

Extra: password managers

Most password managers (if not all) include password generators: KeePass, Bitwarden, etc.

If you have any suggestion, feel free to contact me via social media or email.