random pass

For random.

Generate a cryptologically secure password.

Command Type

built-in

Signature

> random pass {flags}

Flags

  • --chars, -c {int}: Length of the generated password (default 12).
  • --no-uppercase, -u: Exclude uppercase letters A-Z.
  • --no-lowercase, -l: Exclude lowercase letters a-z.
  • --no-numbers, -n: Exclude numbers 0-9.
  • --no-symbols, -s: Exclude symbols like !@#$%.
  • --include-ambiguous: Include ambiguous characters O, 0, l, 1.
  • --include-similar: Include similar characters i, l, 1.
  • --require-each-type: Guarantee at least one char from each enabled character type.

Input/output types:

input output
nothing string

Examples

Generate a 12-character password with defaults

> random pass

Generate a 20-character password

> random pass --chars 20

Generate a password without symbols

> random pass --no-symbols

Generate a password with only uppercase letters and numbers

> random pass --no-lowercase --no-symbols

Generate a password including ambiguous characters and requiring each type

> random pass --include-ambiguous --require-each-type

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.