command(1) on Solnix vs Linux and the BSDs
On Solnix, command is the illumos /usr/bin/command utility, and the ksh93 shell also has a built-in command with extra options. The FreeBSD command(1) page is only an index of shell built-ins (builtin(1)). It lists command as a sh(1) built-in and documents no options, so FreeBSD behaviour cannot be compared flag by flag from the bundle.
The manual pages
- Solnix: command(1) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: command(1) 15.1-RELEASE
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
command
What Solnix runs
A default Solnix system runs the illumos /usr/bin/command. /usr/xpg4/bin/command is also shipped, but the bundle does not say how it differs. The page also describes a ksh93 built-in command, which adds -x and treats -v and -V as whence(1). No Linux page is in the bundle, so nothing is claimed about Linux.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD | what the page documents | The FreeBSD command(1) page is the builtin(1) index of csh(1) and sh(1) built-ins. It lists command but gives no synopsis, options, operands or exit status. Solnix documents -p, -v, -V, operands and exit codes.Source: FreeBSD command(1) NAME, SYNOPSIS, DESCRIPTION; Solnix command(1) SYNOPSIS, OPTIONS, EXIT STATUS |
| FreeBSD | which shells provide command | On FreeBSD, command is a built-in of sh(1) only; the table shows No for csh(1). Solnix ships both an external /usr/bin/command and a ksh93 built-in. The page does not say which shell is the default login shell.Source: FreeBSD command(1) Commands table (command: No*, csh No, sh Yes); Solnix command(1) SYNOPSIS (/usr/bin/command, ksh93) |
| FreeBSD | standalone utility | FreeBSD marks command as No*: an external file exists, but it is a script that uses the shell built-in of the same name. Solnix /usr/bin/command is listed under its own SYNOPSIS, and /usr/xpg4/bin/command is also shipped.Source: FreeBSD command(1) Commands table and the 'No*' note; Solnix command(1) SYNOPSIS |
| FreeBSD | -x option | Solnix ksh93 command -x reruns the command with subsets of the arguments if it fails for too many arguments. The exit status is the maximum of the invocations. /usr/bin/command has no -x, and the FreeBSD page documents no options.Source: Solnix command(1) ksh93 OPTIONS -x; Solnix command(1) /usr/bin/command SYNOPSIS; FreeBSD command(1) (no options) |
| FreeBSD | -v and -V in ksh93 | In Solnix ksh93, command -v is equivalent to whence and command -V to whence -v. whence is not in the FreeBSD built-in table, so no FreeBSD equivalent is documented. Under /usr/bin/command, -V output format is unspecified.Source: Solnix command(1) ksh93 OPTIONS -v, -V; OPTIONS -V; FreeBSD command(1) Commands table |
| FreeBSD | -p search path | Solnix /usr/bin/command -p searches with a default PATH guaranteed to find all standard utilities. ksh93 -p searches 'a default path'. The FreeBSD page does not describe -p.Source: Solnix command(1) OPTIONS -p (both variants); FreeBSD command(1) (no options) |
| FreeBSD | exit status 126 and 127 | Solnix returns 126 if the utility was found but could not be invoked, and 127 if it was not found or command itself failed. With -v or -V, any failure returns a value above 0. The FreeBSD page states no exit codes.Source: Solnix command(1) EXIT STATUS; FreeBSD command(1) (no EXIT STATUS) |
| FreeBSD | special built-ins | Solnix says command suppresses shell function lookup. For a special built-in, the special properties are removed; in ksh93 this means a failure does not terminate the calling script. The FreeBSD page says nothing about this. Source: Solnix command(1) DESCRIPTION (both variants); FreeBSD command(1) DESCRIPTION |
Standards
- POSIX: command is a POSIX.1-2024 utility.
- Solnix: Interface Stability: Committed for
/usr/bin/command.The Standard attribute says 'See standards(7)'. - FreeBSD: The FreeBSD page has no STANDARDS section for command in the bundle.
Writing portable scripts
- Use only command
-vname for existence checks and command name args to bypass functions. Both are documented on Solnix and are POSIX.1-2024. Check exit status, not output text. - Do not use command
-x, and do not parse command-Voutput.-xexists only in Solnix ksh93, and the-Vformat is unspecified.
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.