sum(1) on Solnix vs Linux and the BSDs
On Solnix, sum is the illumos /usr/bin/sum, a much larger tool than the Linux and BSD ones. It selects the checksum with -x method (BSD, System V, CRC, MD5, SHA-2 and others), can check, recurse and list files, and its default method depends on the getconf UNIVERSE.
The manual pages
- Solnix: sum(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: sum(1) coreutils-full-9.11
- FreeBSD: sum(1) 15.1-RELEASE
- NetBSD: sum(1) 11.0
What Solnix runs
A default Solnix system runs the illumos /usr/bin/sum. The same options are also available as the ksh93 built-in sum. /usr/ucb/sum is also shipped, but the bundle does not describe it.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, NetBSD | default algorithm | The Solnix default depends on getconf UNIVERSE: att (System V) in the att universe, bsd otherwise. Linux sum defaults to the BSD algorithm. FreeBSD and NetBSD sum always default to historic algorithm 1, the BSD one. The page does not say which universe a default Solnix system uses. Source: Solnix sum(1) DESCRIPTION; Linux sum(1) -r; FreeBSD sum(1) DESCRIPTION; NetBSD sum(1) DESCRIPTION |
| Linux | -r block size | Solnix -r means --method=bsd --scale=512, so block counts are in 512-byte units. Linux -r uses the BSD algorithm with 1K blocks. The same input can print a different block count.Source: Solnix sum(1) -r; Linux sum(1) -r |
| FreeBSD, NetBSD | -r and -s missing on BSD | Solnix and Linux accept -r (BSD) and -s (System V). The FreeBSD sum synopsis takes no options. The NetBSD sum synopsis has -o 1|2 for the historic algorithms and no -r or -s.Source: Solnix sum(1) -r, -s; Linux sum(1) -r, -s; FreeBSD sum(1) SYNOPSIS; NetBSD sum(1) SYNOPSIS, -o |
| FreeBSD, NetBSD | -o selects algorithm | FreeBSD (via cksum) and NetBSD use -o 1, 2 (FreeBSD also 3) to choose a historic algorithm. Solnix has no -o. It uses -x method, such as -x sys5 or -x bsd, or the -r and -s shortcuts.Source: FreeBSD sum(1) -o; NetBSD sum(1) -o; Solnix sum(1) -x, -r, -s |
| NetBSD | -x, -c, -w, -p, -s, -t, -a meanings | The same letters mean different things. Solnix -x is a method, -s is System V, -t is total only, -p is permissions, -a is list all, -w is --nowarn. NetBSD -x runs a self-test, -s hashes a string, -t is a time trial, -p echoes stdin, -a picks an algorithm, -w enables warnings.Source: Solnix sum(1) -x, -s, -t, -p, -a, -w; NetBSD sum(1) -x, -s, -t, -p, -a, -w |
| Linux, FreeBSD | check mode | Solnix sum -c reads the output of an earlier sum and compares checksums, and -S makes it silent so only the exit status reports a mismatch. The Linux sum page documents no check option. The FreeBSD sum synopsis has none. NetBSD has -c, which exits 1 on an error.Source: Solnix sum(1) -c, -S; Linux sum(1) SYNOPSIS; FreeBSD sum(1) SYNOPSIS; NetBSD sum(1) -c |
| Linux, FreeBSD, NetBSD | cryptographic hashes | Solnix sum -x md5, sha1, sha256, sha384 or sha512 prints a digest with no block count. The Linux sum page lists no digest methods. FreeBSD sum has none (its SEE ALSO points to md5(1)). NetBSD uses -a algorithm or separate md5 and sha* commands.Source: Solnix sum(1) -x; Linux sum(1) DESCRIPTION; FreeBSD sum(1) SEE ALSO; NetBSD sum(1) SYNOPSIS, -a |
| Linux, FreeBSD, NetBSD | directories, lists and permissions | Solnix sum can recurse into directories (-R) and follow symlinks (-L, -H, -P). It can read a list of files (-l) and record or restore mode, user and group (-p). The Linux, FreeBSD and NetBSD sum pages document none of these.Source: Solnix sum(1) -R, -L, -H, -P, -l, -p; Linux sum(1) SYNOPSIS; FreeBSD sum(1) SYNOPSIS; NetBSD sum(1) SYNOPSIS |
| Linux | long options and text mode | Solnix has long options for every flag (--all, --check, --method and so on), and -T reads in text mode. Linux sum documents only -r, -s, --sysv, --help and --version.Source: Solnix sum(1) OPTIONS; Linux sum(1) DESCRIPTION |
| FreeBSD, NetBSD | sum is a mode of cksum | On FreeBSD and NetBSD, sum is documented as cksum defaulting to algorithm 1, for compatibility only. Solnix documents sum as its own utility with a method selector. Solnix cksum(1) is described only as the posix method. Source: FreeBSD sum(1) DESCRIPTION; NetBSD sum(1) DESCRIPTION; Solnix sum(1) -x posix|cksum |
Standards
- POSIX: sum is not a POSIX.1-2024 utility.
- FreeBSD: The cksum utility is expected to conform to IEEE Std 1003.2-1992 (“POSIX.2”). The page makes no such claim for sum.
Writing portable scripts
- Pass the algorithm explicitly and do not rely on the default sum output. The default differs between the att and bsd universes on Solnix and is always the BSD algorithm on FreeBSD and NetBSD.
- For a portable checksum, use cksum or a hash tool instead of sum. Only
-rand-sexist on Solnix and Linux, and neither exists on the BSD pages.
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.