units(1) on Solnix vs Linux and the BSDs

On Solnix, units is the illumos /usr/bin/units. Its page documents no options and no command-line conversion: it runs only interactively, prompting "You have:" and "You want:". FreeBSD, OpenBSD and NetBSD all document a one-shot `from to` form and a -f option for a units file.

What Solnix runs

A default Solnix system runs the illumos units at /usr/bin/units, published in pkgs.solnix.illumos-world-man. No other variants are shipped. The page says the full unit list is in /usr/share/lib/unittab.

Differences

Compared withTopicWhat differs
FreeBSD, OpenBSD, NetBSDnon-interactive conversionThe Solnix page documents only interactive use (SYNOPSIS is just `units`). FreeBSD, OpenBSD and NetBSD accept `from to` (OpenBSD and NetBSD also `count from-unit to-unit`) on the command line and print only the result.
Source: Solnix units(1) SYNOPSIS; FreeBSD units(1) from to; OpenBSD units(1) [count] from-unit to-unit; NetBSD units(1) [count] from-unit to-unit
FreeBSD, OpenBSD, NetBSDcustom units file (-f)The Solnix page documents no -f option and no way to load your own units file. FreeBSD, OpenBSD and NetBSD all document -f filename.
Source: Solnix units(1) SYNOPSIS; FreeBSD units(1) -f; OpenBSD units(1) -f; NetBSD units(1) -f
FreeBSD, OpenBSD, NetBSD-q and -v flagsThe Solnix page documents no options. FreeBSD, OpenBSD and NetBSD document -q to suppress prompts and load statistics, and -v to print the version (FreeBSD: more verbose output and the units in the result).
Source: Solnix units(1) SYNOPSIS; FreeBSD units(1) -q, -v; OpenBSD units(1) -q, -v; NetBSD units(1) -q, -v
FreeBSDscripting and output optionsFreeBSD has -t/--terse (print only the result), -o format (default %.8g), -e, -U and long options. The Solnix page documents none of these. Solnix interactive output is shown in e-notation, such as 2.540000e+00.
Source: FreeBSD units(1) -t, -o, -e, -U; Solnix units(1) DESCRIPTION examples
NetBSDlisting definitionsNetBSD -l and -L list all unit definitions instead of converting. -L reduces them to primitive units. The Solnix page documents no listing option; it points to `cat /usr/share/lib/unittab`.
Source: NetBSD units(1) -l, -L; Solnix units(1) DESCRIPTION (last paragraph)
FreeBSD, OpenBSD, NetBSDpoundSolnix says `pound` is not recognized as a unit of mass and `lb` is. FreeBSD, OpenBSD and NetBSD each say `pound` is a unit of mass. The Solnix example uses `lbs force/in2`.
Source: Solnix units(1) DESCRIPTION; FreeBSD units(1) Units; OpenBSD units(1); NetBSD units(1)
FreeBSD, OpenBSD, NetBSDdata file locationSolnix names /usr/share/lib/unittab as the unit list. FreeBSD names /usr/share/misc/definitions.units, found by searching under each directory in PATH. The OpenBSD and NetBSD pages give no path.
Source: Solnix units(1) DESCRIPTION; FreeBSD units(1) ENVIRONMENT (PATH); OpenBSD units(1); NetBSD units(1)
FreeBSDaffine conversionsFreeBSD says units handles multiplicative or affine scale changes. Solnix, OpenBSD and NetBSD say multiplicative only, so Celsius to Fahrenheit is not possible there.
Source: FreeBSD units(1) DESCRIPTION; Solnix units(1) DESCRIPTION; OpenBSD units(1); NetBSD units(1)
FreeBSD, OpenBSD, NetBSDsyntax details documentedFreeBSD, OpenBSD and NetBSD document `|` for dividing numbers, versus `/` for units, and the one-digit exponent limit in BUGS. They also document trailing `s`/`es` removal when looking up a unit. The Solnix page describes none of these.
Source: FreeBSD units(1) Mathematical operators, BUGS; OpenBSD units(1) BUGS; NetBSD units(1) BUGS; Solnix units(1) DESCRIPTION
FreeBSD, OpenBSD, NetBSDexit statusFreeBSD documents exit 0 on success and >0 on error. The Solnix, OpenBSD and NetBSD pages in the bundle have no exit status section.
Source: FreeBSD units(1) EXIT STATUS; Solnix units(1)

Standards

  • POSIX: units is not a POSIX.1-2024 utility.
  • Solnix: The page's SEE ALSO points to attributes(7); the bundle text has no ATTRIBUTES or standards section.

Writing portable scripts

  • Do not script units with arguments: the Solnix page documents only interactive use. Pipe `You have`/`You want` answers on stdin, and test it on each target.
  • Do not depend on `pound`, the data file path, or -t/-q output on all systems; use `lb`, which the Solnix page names.

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.