# Created on savesnippets.com · https://savesnippets.com/aCxqwRJTHXsWXI # Linux — kernel-provided cat /proc/sys/kernel/random/uuid # f47ac10b-58cc-4372-a567-0e02b2c3d479 # Cross-platform — uuidgen (BSD-style on macOS, util-linux on Linux) uuidgen uuidgen | tr '[:upper:]' '[:lower:]' # macOS uppercases — fix it # Via python (always available) python3 -c "import uuid; print(uuid.uuid4())" # Via openssl (somewhat random — not a true v4 but good enough as a token) openssl rand -hex 16 # Or build something shorter and URL-safe for non-UUID use openssl rand -base64 16 | tr -d '=+/' | head -c 16