whoami(1) on Solnix vs Linux and the BSDs

whoami is not in the Solnix base system: the GNU coreutils version comes from pkgs.solnix.coreutils. It is the same program as on Linux and prints the effective user name, like id -un. The BSDs document a different synopsis, with no options.

What Solnix runs

Not installed by default as the coreutils version: add pkgs.solnix.coreutils. The header lists /usr/ucb/whoami as another illumos variant, but the bundle has no text describing it, so the manual does not say how it differs.

Differences

Compared withTopicWhat differs
Linuxsame implementationThe Solnix page is the GNU coreutils whoami page, and its text matches the Linux page: same synopsis, same --help and --version, same 'Same as id -un'. Expect identical behaviour. Only the packaged coreutils version string differs (Solnix page says 9.7).
Source: Solnix whoami(1) SYNOPSIS, DESCRIPTION; Linux whoami(1) SYNOPSIS, DESCRIPTION
FreeBSD, OpenBSD, NetBSD-p optionFreeBSD, OpenBSD and NetBSD whoami pages list no options in the text, and the extracted flags show -p. The Solnix GNU page documents only --help and --version, and no -p. The BSD pages suggest id -p for interactive use.
Source: FreeBSD/OpenBSD/NetBSD whoami(1) SYNOPSIS, DESCRIPTION; Solnix whoami(1) SYNOPSIS, DESCRIPTION
FreeBSD, OpenBSD, NetBSD--help and --versionSolnix whoami accepts --help and --version. The FreeBSD, OpenBSD and NetBSD pages document no long options and the synopsis is just whoami.
Source: Solnix whoami(1) DESCRIPTION; FreeBSD/OpenBSD/NetBSD whoami(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDobsolescence statusThe BSD pages call whoami obsolete, replaced by id(1), and equivalent to id -un. The Solnix page says only 'Same as id -un' and does not call it obsolete.
Source: FreeBSD/OpenBSD/NetBSD whoami(1) DESCRIPTION; Solnix whoami(1) DESCRIPTION
FreeBSD, OpenBSD, NetBSDexit statusThe BSD pages document exit 0 on success and >0 on error. The Solnix page has no EXIT STATUS section, so the manual does not say what it returns.
Source: FreeBSD/OpenBSD/NetBSD whoami(1) EXIT STATUS; Solnix whoami(1)

Standards

  • POSIX: whoami is not a POSIX.1-2024 utility.

Writing portable scripts

  • Use id -un in portable scripts: every page in the bundle names it as the equivalent of whoami, and whoami is not in POSIX.1-2024.
  • Call whoami with no arguments. The BSD pages document no long options, and the Solnix page documents no -p.

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.