At the same time, a random password generator has been present in the repositories of all Linux distributions since the nineties and is called
. Many passwords that you have received in your life are most likely generated by him.
Interestingly, its author is Theodore Tso, the one who developed the ext2 filesystem and its journaled versions ext3 and ext4.
16 1 will generate one sixteen character password.
$ pwgen 16 1
If you do not specify the second argument (the number of passwords), then by default in interactive mode
will generate as many as eighty passwords - four columns of twenty lines. As conceived by the authors, this should protect the user from those who like to look into someone else's screen.
So if you starting an online site, an eCommerce shop or any other use case that requires a password, the user generates a whole password table and copies or memorizes one random one from it. In this case, an attacker or an excessively curious office colleague will not be able to find out which password out of eight dozen the user has chosen. In the days of massive remote work, this argument seems a bit taut, and it is doubtful that passwords are so easy to remember.
In modern times, the
option is much more useful, which generates completely random passwords with no claim to readability. You can also add -B / - ambiguous to it, which excludes appearance-like characters like O / 0 and 1 / I from the output.
-s / - secure
$ pwgen -sB 16 1