How to install pwgen in Linux all versions and Mac & Docker?

The pwgen program generates passwords which are designed to be easily memorized by humans, while being as secure as possible. Human-memorable passwords are never going to be as secure as completely completely random passwords. In particular, passwords generated by pwgen without the -s option should not be used in places where the password could be attacked via an off-line brute-force attack. On the other hand, completely randomly generated passwords have a tendency to be written down, and are subject to being compromised in that fashion.

The pwgen program is designed to be used both interactively, and in shell scripts. Hence, its default behavior differs depending on whether the standard output is a tty device or a pipe to another program. Used interactively, pwgen will display a screenful of passwords, allowing the user to pick a single password, and then quickly erase the screen. This prevents someone from being able to “shoulder surf” the user’s chosen password.

When standard output (stdout) is not a tty, pwgen will only generate one password, as this tends to be much more convenient for shell scripts, and in order to be compatible with previous versions of this program.

In addition, for backwards compatibility reasons, when stdout is not a tty and secure password generation mode has not been requested, pwgen will generate less secure passwords, as if the -0A options had been passed to it on the command line. This can be overriden using the -nc options. In the future, the behavior when stdout is a tty may change, so shell scripts using pwgen should explicitly specify the -nc or -0A options. The latter is not recommended for security reasons, since such passwords are far too easy to guess.

Debian		$ apt-get install pwgen
Ubuntu 		$ apt-get install pwgen
Alpine		$ apk add pwgen
Arch Linux	$ pacman -S pwgen
Kali Linux	$ apt-get install pwgen
Fedora		$ dnf install pwgen
OS X		$ brew install pwgen
Raspbian	$ apt-get install pwgen
Docker		$ docker run cmd.cat/pwgen pwgen
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x