hostid(1) on Solnix vs Linux and the BSDs
On Solnix, hostid is the illumos command at /usr/bin/hostid. It prints the host identifier in hexadecimal and takes no options. In a non-global zone that emulates a host identifier, it prints the emulated value. The only counterpart in the bundle is GNU coreutils hostid on Linux; the bundle has no FreeBSD, OpenBSD or NetBSD hostid page.
The manual pages
- Solnix: hostid(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: hostid(1) coreutils-full-9.11
What Solnix runs
A default Solnix system runs the illumos hostid at /usr/bin/hostid. /usr/ucb/hostid is also shipped, but the bundle does not describe it. The package is pkgs.solnix.illumos-world-man.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | options | Solnix hostid has no options in its SYNOPSIS (just /usr/bin/hostid). Linux (GNU coreutils) hostid documents --help and --version. A script that runs hostid --version on Solnix gets no documented behaviour.Source: Solnix hostid(1) SYNOPSIS; Linux hostid(1) SYNOPSIS, --help, --version |
| Linux | zones and emulated host ID | Solnix hostid, run in a non-global zone that emulates a host identifier, prints the emulated identifier. The Linux page does not mention zones or emulation. Source: Solnix hostid(1) DESCRIPTION; Linux hostid(1) DESCRIPTION |
| Linux | output format | Both pages say the identifier is printed in hexadecimal. Neither page documents digit count, letter case or zero padding, so do not rely on a fixed width when comparing output across systems. Source: Solnix hostid(1) DESCRIPTION; Linux hostid(1) DESCRIPTION |
| Linux | underlying library call | The Solnix page refers to sysinfo(2) and gethostid(3C). The Linux page refers only to gethostid(3). The pages do not say how either system derives the value. Source: Solnix hostid(1) SEE ALSO; Linux hostid(1) SEE ALSO |
| FreeBSD, OpenBSD, NetBSD | BSD counterparts | The bundle has no hostid page for FreeBSD, OpenBSD or NetBSD, so the manual material provided does not say whether those systems have this command or how it behaves. Source: Bundle header lists only a Linux counterpart for hostid(1) |
Standards
- POSIX: hostid is not a POSIX.1-2024 utility.
Writing portable scripts
- Do not assume hostid exists on the BSDs; test with command
-vhostid first. - Treat the output as an opaque hexadecimal string. Do not depend on its width, case or on options such as
--version.
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.