Generate a UUID With uuidgen
Create a random RFC 4122 UUID from the shell.
Run uuidgen to print a new random UUID.
01Command
Command
$ uuidgen02What it does
uuidgen produces a version-4 UUID, useful for filenames, database keys, test fixtures and temporary identifiers. Options can force lowercase or uppercase output; on Linux the same command comes from util-linux.
03Risk
!Warning: A UUID is random, not secret; do not use it as a password or token.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- uuidgen(1) — Linux manual pageEvidence: Generates a new universally unique identifier; macOS ships the same command.
Last verified: 2026-09-20 · Category: Developer