uuidgen(1) on Solnix vs Linux and the BSDs
On Solnix, uuidgen is the illumos /usr/bin/uuidgen. It prints one UUID, random (version 4) by default, and has only -r, -t and -o. Linux, FreeBSD and NetBSD all use other flags: -n, -s and -c mean different things or are missing, and there is no count option.
The manual pages
- Solnix: uuidgen(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: uuidgen(1) util-linux-2.42.3
- FreeBSD: uuidgen(1) 15.1-RELEASE
- NetBSD: uuidgen(1) 11.0
What Solnix runs
A default Solnix system runs the illumos uuidgen at /usr/bin/uuidgen. No other variants are shipped. The page is published in pkgs.solnix.illumos-world-man.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | default UUID version | Solnix uuidgen with no options makes a random (DCE version 4) UUID. FreeBSD uuidgen by default makes a DCE version 1 UUID, and needs -r to get a random version 4 one.Source: Solnix uuidgen(1) DESCRIPTION; FreeBSD uuidgen(1) DESCRIPTION, -r |
| Linux | default UUID version | Solnix always defaults to a random UUID. Linux defaults to random only if a high-quality random number generator is present, and otherwise picks a time-based UUID. Source: Solnix uuidgen(1) DESCRIPTION; Linux uuidgen(1) DESCRIPTION |
| NetBSD | default UUID version | The NetBSD page does not say which UUID version the default is, so a script cannot assume it matches Solnix's random version 4. Source: NetBSD uuidgen(1) DESCRIPTION |
| FreeBSD, NetBSD | generating several UUIDs | FreeBSD and NetBSD have -n count (and -1 for one-at-a-time) to print several UUIDs. Solnix has no count option, so a script must call uuidgen once per UUID.Source: FreeBSD uuidgen(1) -n, -1; NetBSD uuidgen(1) -n, -1; Solnix uuidgen(1) SYNOPSIS |
| Linux | -n meaning and count | On Linux, -n (--namespace) selects the namespace for MD5 or SHA1 hash-based UUIDs, and the count is -C (--count). On Solnix, -n does not exist.Source: Linux uuidgen(1) -n, -C; Solnix uuidgen(1) SYNOPSIS |
| Linux | -o missing on Linux | Solnix -o filename writes output to a file. The Linux page lists no -o option, so a script using it fails there. Use shell redirection instead.Source: Solnix uuidgen(1) -o; Linux uuidgen(1) OPTIONS |
| Linux, NetBSD | -s meaning | Solnix has no -s. On Linux, -s (--sha1) selects a hash-based UUID. On NetBSD, -s prints UUIDs as initialized C structures instead of the standard string.Source: Linux uuidgen(1) -s, --sha1; NetBSD uuidgen(1) -s; Solnix uuidgen(1) SYNOPSIS |
| FreeBSD, NetBSD | -t (time-based) option | Solnix and Linux accept -t to force a time-based UUID. The FreeBSD and NetBSD synopses have no -t. FreeBSD's default is already version 1.Source: Solnix uuidgen(1) -t; Linux uuidgen(1) -t, --time; FreeBSD uuidgen(1) SYNOPSIS; NetBSD uuidgen(1) SYNOPSIS |
| NetBSD | -r (random) option | Solnix, Linux and FreeBSD accept -r for a random UUID. The NetBSD synopsis has no -r.Source: Solnix uuidgen(1) -r; Linux uuidgen(1) -r; FreeBSD uuidgen(1) -r; NetBSD uuidgen(1) SYNOPSIS |
| Linux | hash-based and sortable UUIDs | Linux can make MD5 or SHA1 name-based UUIDs (--md5, --sha1 with --namespace and --name) and time-sortable ones (-6, -7). The Solnix page documents none of these.Source: Linux uuidgen(1) -m, -s, -n, -N, -6, -7; Solnix uuidgen(1) SYNOPSIS |
| FreeBSD | compact output | FreeBSD -c prints a compact UUID without hyphens. Solnix has no -c and its page documents no way to drop the hyphens.Source: FreeBSD uuidgen(1) -c; Solnix uuidgen(1) SYNOPSIS |
| Linux, FreeBSD, NetBSD | exit status | Solnix documents exit 0 on success and >0 on failure. FreeBSD documents the same. The Linux and NetBSD pages have no exit status section. Source: Solnix uuidgen(1) EXIT STATUS; FreeBSD uuidgen(1) EXIT STATUS; Linux uuidgen(1); NetBSD uuidgen(1) |
Standards
- POSIX: uuidgen is not a POSIX.1-2024 utility.
- Solnix: Interface Stability: Uncommitted.
- Linux: CONFORMING TO: OSF DCE 1.1.
- FreeBSD: The page has no STANDARDS section. HISTORY: first appeared in FreeBSD 5.0.
- NetBSD: The page has no STANDARDS section. HISTORY: first appeared in NetBSD 3.0.
Writing portable scripts
- Run plain `uuidgen` with no options and redirect with the shell (`uuidgen > file`) instead of
-o.-ois missing on Linux, and the default version differs between systems (random on Solnix, version 1 on FreeBSD). - For several UUIDs, call uuidgen in a loop.
-nmeans a count on FreeBSD and NetBSD, a namespace on Linux, and does not exist on Solnix.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.