whoami(1b) on Solnix vs Linux and the BSDs
On Solnix, whoami is the illumos BSD-compatibility command at /usr/ucb/whoami, not in the ordinary /usr/bin. It prints the login name for the effective user ID and takes no options. The page documents no exit status. Linux adds --help and --version, and the BSDs document it as obsolete in favour of id(1).
The manual pages
- Solnix: whoami(1b) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: whoami(1) coreutils-full-9.11
- FreeBSD: whoami(1) 15.1-RELEASE
- OpenBSD: whoami(1) 8.0
- NetBSD: whoami(1) 11.0
What Solnix runs
A default Solnix system runs the illumos whoami at /usr/ucb/whoami, the only variant shipped. The page gives the path /usr/ucb/whoami in its SYNOPSIS, so /usr/ucb must be on PATH for the bare name to resolve. The bundle does not say what PATH contains by default.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | options | Linux whoami (coreutils) accepts --help and --version. The Solnix page documents no options at all.Source: Linux whoami(1) SYNOPSIS, --help, --version; Solnix whoami(1b) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | -p flag in extracted options | The option extractor lists -p for the three BSD pages, but their SYNOPSIS is plain whoami. The -p appears only in the advice to use id -p, which is an id(1) option. Treat whoami as option-less everywhere on the BSDs.Source: FreeBSD whoami(1) SYNOPSIS, DESCRIPTION; OpenBSD whoami(1) SYNOPSIS, DESCRIPTION; NetBSD whoami(1) SYNOPSIS, DESCRIPTION |
| all four | documented equivalence to id -un | Linux, FreeBSD, OpenBSD and NetBSD all say whoami is the same as id -un. The Solnix page does not mention id. It says the name comes from geteuid and getpwuid.Source: Linux whoami(1) DESCRIPTION; FreeBSD/OpenBSD/NetBSD whoami(1) DESCRIPTION; Solnix whoami(1b) DESCRIPTION |
| FreeBSD, OpenBSD, NetBSD | obsolescence | The BSD pages say whoami is obsoleted by id(1) and suggest id -p for interactive use. The Solnix page carries no such notice and does not refer to id(1).Source: FreeBSD/OpenBSD/NetBSD whoami(1) DESCRIPTION; Solnix whoami(1b) SEE ALSO |
| FreeBSD, OpenBSD, NetBSD | exit status | The BSD pages document exit 0 on success and >0 on error. The Solnix page has no EXIT STATUS section, so do not rely on a specific nonzero value from it. Source: FreeBSD/OpenBSD/NetBSD whoami(1) EXIT STATUS; Solnix whoami(1b) (no EXIT STATUS section) |
| all four | su behaviour documented | The Solnix page states that after su, whoami reports the login name of the adopted user ID. The counterpart pages only say effective user ID, which gives the same result, but do not mention su. Source: Solnix whoami(1b) DESCRIPTION; Linux/FreeBSD/OpenBSD/NetBSD whoami(1) DESCRIPTION |
| all four | location and package | The Solnix page is the BSD-compatibility (section 1b) page for /usr/ucb/whoami, published in pkgs.solnix.illumos-world-man. The counterparts are ordinary section 1 pages.Source: Solnix whoami(1b) header and SYNOPSIS; counterpart whoami(1) pages |
Standards
- POSIX: whoami is not a POSIX.1-2024 utility.
- Solnix: The page has no STANDARDS or ATTRIBUTES section.
- Linux: The page has no standards section. It documents GNU coreutils whoami and says it is the same as id
-un. - OpenBSD: HISTORY: whoami first appeared in 2BSD.
Writing portable scripts
- Use id
-unin portable scripts. All four counterpart pages give it as the equivalent, and it does not depend on/usr/ucbbeing on PATH. - Call whoami with no arguments. Only Linux accepts any option (
--help,--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.