PWG(1) General Commands Manual PWG(1)

pwgpassword generator

pwg [-an] [-w wordlist] [length]

pwg generates a random string of characters or a diceware-style passphrase using a word list, a file with one word per line. The random properties are the ones provided by the operating system' /dev/urandom device.

The options are as follows:

Use only alphanumeric characters.
Use only numbers.
Generate a passphrase from a the given wordlist instead of a random string of characters.

If no length is given, an appropriate one is used.

The pwg utility exits 0 on success, and >0 if an error occurs.

Generate a passphrase using the EFF “large” wordlist:

$ ftp -o- \
	| awk '{print $2}' >~/wordlist
$ pwg -w ~/wordlist
elm retouch disclose snaking pregame bonfire

The pwg utility was written by Omar Polo <>.

November 23, 2023 OpenBSD 7.4