You do not need a program to make a UUID at the shell. Most systems ship uuidgen, and Linux exposes a UUID through the kernel random interface.
Key takeaways
- uuidgen prints a UUID on macOS and most Linux systems.
- On Linux, cat /proc/sys/kernel/random/uuid also works.
- macOS uuidgen prints uppercase; pipe through tr for lowercase.
For implementation context, continue with Bulk UUIDs, UUID v4, and Go. These pages cover the closest generator, comparison, validation or storage decisions without repeating this guide.
Generate one UUID
uuidgen is the portable option. macOS prints uppercase, so normalize to lowercase when your system expects it. On Linux the kernel interface is a dependency-free alternative.
uuidgen # e.g. 4F8B1A9A-... (uppercase on macOS)
uuidgen | tr 'A-F' 'a-f' # force lowercase
# Linux, no uuidgen needed:
cat /proc/sys/kernel/random/uuidGenerate many at once
A short loop writes a batch to a file for fixtures, seed data or imports.
for i in $(seq 1 100); do uuidgen; done > uuids.txt