pwgen

Generate pronounceable or fully random values

About

pwgen produces random strings, either pronounceable ones or fully random ones. Use it when you need a batch of candidate values or one strong secret for a script. Options control length, count, symbols and look-alike characters.

Install it

pkg install pwgen

Run this inside Termux. If the package is already present, pkg will say so and do nothing.

Commands worth knowing

6 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.

pwgen 16 5 Generate five 16-character values, easy to read aloud.
pwgen -s 20 3 Produce three fully random 20-character strings, with no attempt at memorability.
pwgen -y 14 4 Include at least one symbol in each 14-character value. Some sites demand one.
pwgen -1 18 Print a single 18-character value. Convenient inside a script.
pwgen -n 12 5 Avoid characters that look alike. Helpful for values typed by hand.
pwgen -B 16 3 Drop look-alike characters, such as the digit one.

Worked example

Run pwgen 16 5 and this is what you should see.

termux
$ pwgen 16 5
sheiN9ah
Eequai0u
ohZ4eiph
Aiw5ooNg
Wae5Ahvu

Developed by

Theodore Ts'o .