id(1) on Solnix vs Linux and the BSDs

On a default Solnix system, id on PATH is the illumos /usr/bin/id. The published Solnix page is GNU coreutils 9.7, identical in options to the Linux page. The bundle does not include the illumos page, so GNU-only options such as -z, -Z and the long options may not work on /usr/bin/id. The BSDs lack those options and add -p.

What Solnix runs

A default Solnix system runs the illumos id at /usr/bin/id, and /usr/xpg4/bin/id is also shipped. The bundle does not contain the illumos text, so it does not show what options either one accepts or how they differ. The Solnix page published by pkgs.solnix.coreutils is GNU coreutils 9.7 id. Its options apply only if that GNU id is the one you run.

Differences

Compared withTopicWhat differs
Linuxsame program as the published pageThe Solnix page from pkgs.solnix.coreutils and the Linux page document the same GNU coreutils id: same synopsis and the same options (-a, -Z, -g, -G, -n, -r, -u, -z, --help, --version). Only the Solnix page's version (9.7) differs from Linux's (9.11).
Source: Solnix id(1) SYNOPSIS and DESCRIPTION; Linux id(1) SYNOPSIS and DESCRIPTION
Linuxwhich id runs on SolnixOn a default Solnix system, plain id is the illumos /usr/bin/id, not the GNU one the published page describes. The bundle does not say which GNU-only options (-z, -Z, long options) the illumos id accepts. A script written against Linux id may not behave the same.
Source: Header line 'command on PATH is: illumos at /usr/bin/id'; Solnix id(1) (GNU coreutils 9.7 page)
FreeBSD, OpenBSD, NetBSD-p human-readable outputFreeBSD, OpenBSD and NetBSD have -p, which prints labelled lines: login, uid, euid, rgid and groups. OpenBSD also prints class. The Solnix GNU page and the Linux page have no -p.
Source: FreeBSD id(1) -p; OpenBSD id(1) -p; NetBSD id(1) -p; Solnix id(1) OPTIONS
FreeBSD, OpenBSD, NetBSDlong options and -zThe BSD pages document only single-letter options. The GNU page has --user, --group, --groups, --name, --real, --context, --zero and -z, which delimits entries with NUL and is not permitted in the default format.
Source: Solnix id(1) -z, --zero, --user, --group; FreeBSD/OpenBSD/NetBSD id(1) SYNOPSIS
FreeBSD-Z versus -M and -AThe Solnix GNU page has -Z/--context, which prints only the security context of the process. FreeBSD has no -Z. It has -M for the MAC label and -A for audit properties, which needs privilege.
Source: Solnix id(1) -Z, --context; FreeBSD id(1) -M, -A
FreeBSD, OpenBSD, NetBSD-r scopeGNU -r applies to -u, -g and -G. On the BSDs the synopses allow -r only with -g and -u, and -G takes only -n. Do not combine -G with -r in portable scripts.
Source: Solnix id(1) -r, --real; FreeBSD id(1) SYNOPSIS; OpenBSD id(1) SYNOPSIS; NetBSD id(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDmultiple usersThe Solnix GNU page takes [USER]..., so you can name several users. The BSD synopses take a single [user].
Source: Solnix id(1) SYNOPSIS; FreeBSD/OpenBSD/NetBSD id(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDdefault outputThe BSD pages say the default shows only the real ID when real and effective IDs are equal, and both when they differ. For a named user, real and effective IDs are assumed equal. The Solnix GNU page says only 'some useful set of identified information'.
Source: FreeBSD/OpenBSD/NetBSD id(1) DESCRIPTION; Solnix id(1) DESCRIPTION
FreeBSD, OpenBSDBSD-only extensionsFreeBSD adds -c (login class), -d (home directory), -s (shell) and -P (password-file format). OpenBSD adds -c (login class) and -R (routing table). None of these appear on the Solnix GNU page.
Source: FreeBSD id(1) -c, -d, -s, -P; OpenBSD id(1) -c, -R; Solnix id(1) OPTIONS
OpenBSD, NetBSD-aThe Solnix GNU page and FreeBSD document -a as ignored for compatibility. The OpenBSD and NetBSD pages list no -a option.
Source: Solnix id(1) -a; FreeBSD id(1) -a; OpenBSD id(1) SYNOPSIS; NetBSD id(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDexit status documentedThe BSD pages state that id exits 0 on success and >0 on error. The Solnix GNU page has no EXIT STATUS section.
Source: FreeBSD/OpenBSD/NetBSD id(1) EXIT STATUS; Solnix id(1)

Standards

  • POSIX: id is a POSIX.1-2024 utility.
  • OpenBSD: The id utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. The flags [-cpR] are extensions to that specification.
  • NetBSD: The id function is expected to conform to IEEE Std 1003.2 (“POSIX.2”).
  • FreeBSD: The id utility is expected to conform. The -A, -M, -P, -c, -d, -p, and -s options are FreeBSD extensions.
  • Solnix: The published Solnix page (GNU coreutils) has no STANDARDS section. The bundle has no illumos page for /usr/bin/id or /usr/xpg4/bin/id.

Writing portable scripts

  • Stick to -u, -g and -G, with -n and -r only on -u and -g, and one optional user. These work on every page in the bundle. Avoid -p, -z, -Z and the long options.
  • Do not depend on the order of IDs from -G: the BSD pages say 'in no particular order'.

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.