Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

random uuid for random

Generate a random uuid string of the specified version.

Signature

> random uuid {flags}

Flags

  • --version, -v {int}: The UUID version to generate (1, 3, 4, 5, 7). Defaults to 4 if not specified.
  • --namespace, -n {string}: The namespace for v3 and v5 UUIDs (dns, url, oid, x500). Required for v3 and v5.
  • --name, -s {string}: The name string for v3 and v5 UUIDs. Required for v3 and v5.
  • --mac, -m {string}: The MAC address (node ID) used to generate v1 UUIDs. Required for v1.

Input/output types:

inputoutput
nothingstring

Examples

Generate a random uuid v4 string (default)

> random uuid

Generate a uuid v1 string (timestamp-based)

> random uuid -v 1 -m 00:11:22:33:44:55

Generate a uuid v3 string (namespace with MD5)

> random uuid -v 3 -n dns -s example.com

Generate a uuid v4 string (random).

> random uuid -v 4

Generate a uuid v5 string (namespace with SHA1)

> random uuid -v 5 -n dns -s example.com

Generate a uuid v7 string (timestamp + random)

> random uuid -v 7