---
name: "pwqgen"
section: "1"
platform: "linux"
package: "passwdqc"
version: "2.0.3-2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pwqgen"
---

# pwqgen(1)

Generate quality controllable random passphrase

## NAME

**pwqgen** – Generate quality controllable random passphrase

## SYNOPSIS

**pwqgen** \[*options*\]

## DESCRIPTION

The **pwqgen** program generates a random passphrase using the libpasswdqc library. Strength of the generated passphrase depends on the amount of randomness read from */dev/urandom*.

## OPTIONS

- **random**=*N*

  (default: **random**=47) The size of randomly-generated passphrase in bits (24 to 136).

- **config**=*FILE*

  Load config *FILE* in the **passwdqc.conf** format.  This file may define any options described in [passwdqc.conf(5)](/passwdqc.conf/5.md), but only the **random** and **config** options are honored by **pwqgen**.

- **--version**

  Output **pwqgen** program version and exit.

- **-h**, **--help**

  Output **pwqgen** help text and exit.

## EXIT STATUS

**pwqgen** exits with non-zero status when it encounters invalid config file, invalid option, invalid parameter value, when it fails to obtain enough randomness, and in any case when it fails to generate a passphrase.

## FILES

*/etc/passwdqc.conf* (not read unless this suggested file location is specified with the **config=/etc/passwdqc.conf** option).

## SEE ALSO

[pwqcheck(1)](/pwqcheck/1.md), [libpasswdqc(3)](/libpasswdqc/3.md), [urandom(4)](/urandom/4.md), [passwdqc.conf(5)](/passwdqc.conf/5.md), [pam\_passwdqc(8)](/pam_passwdqc/8.md).

https://www.openwall.com/passwdqc/

## AUTHORS

The pam\_passwdqc module was written for Openwall GNU/\*/Linux by Solar Designer. The **pwqgen** program was originally written for ALT GNU/\*/Linux by Dmitry V. Levin, indirectly reusing code from pam\_passwdqc (via libpasswdqc). This manual page was written for Openwall GNU/\*/Linux by Dmitry V. Levin.
