sha256sum(1) on Solnix vs Linux and the BSDs
sha256sum is not in the Solnix base system. Install pkgs.solnix.coreutils to get the GNU coreutils sha256sum, which has the same options as the Linux one. FreeBSD's sha256sum is a different program in GNU-compatible mode, so its verify output and -z behaviour differ.
The manual pages
- Solnix: sha256sum(1) from
pkgs.solnix.coreutils - Linux: sha256sum(1) coreutils-full-9.11
- FreeBSD: sha256sum(1) 15.1-RELEASE
What Solnix runs
Not installed by default: add pkgs.solnix.coreutils. The published Solnix page is the GNU coreutils 9.7 page (April 2025). No illumos variants are listed for this command, and the bundle has no illumos page to compare.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | not in the base system | A default Solnix system has no sha256sum on PATH until pkgs.solnix.coreutils is installed. A script that calls sha256sum on a fresh Solnix install will fail with command not found. Source: Solnix bundle header (none: install pkgs.solnix.coreutils); Solnix sha256sum(1) NAME |
| Linux | same program | Solnix and Linux both document GNU coreutils sha256sum with an identical SYNOPSIS and the same options (-b, -c, -t, -w, -z, --tag, --quiet, --status, --strict, --ignore-missing). Only the version differs: the Solnix page is 9.7, the Linux bundle is 9.11.Source: Solnix sha256sum(1) SYNOPSIS, DESCRIPTION; Linux sha256sum(1) SYNOPSIS, DESCRIPTION |
| FreeBSD | different implementation | FreeBSD documents sha256sum in one shared page with md5, sha1, sha512, shasum and others. It is a FreeBSD program that imitates GNU options and output. It is not GNU coreutils, as it is on Solnix and Linux. Source: FreeBSD sha256sum(1) NAME, DESCRIPTION (options and output format that match those of their similarly named GNU utilities) |
| FreeBSD | mode depends on program name | On FreeBSD, GNU options apply only when the program name ends in "sum". Run as sha256, -c takes a string to compare against and -q, -r, -s, -p, -x change the output. The Solnix page has none of these.Source: FreeBSD sha256sum(1) BSD OPTIONS (-c string, -p, -q, -r, -s, -x), GNU OPTIONS; Solnix sha256sum(1) SYNOPSIS |
| FreeBSD | output while checking (-c) | FreeBSD -c prints "name: OK" or "name: FAILED" for each well-formed line, then the count of failures and skipped lines. Solnix describes only --quiet (no OK lines) and does not document the check output format.Source: FreeBSD sha256sum(1) GNU OPTIONS -c, --quiet; Solnix sha256sum(1) -c, --quiet |
| FreeBSD | -c input format | FreeBSD -c accepts digest files in classical BSD format or GNU format. The Solnix page says only that the input should be a former output of this program. It does not say whether --tag output can be checked.Source: FreeBSD sha256sum(1) GNU OPTIONS -c; Solnix sha256sum(1) DESCRIPTION, --tag |
| FreeBSD | -z and file name escaping | Solnix -z ends lines with NUL and also disables file name escaping. FreeBSD -z only terminates lines with NUL. FreeBSD encodes file names with unprintable characters per vis(3) (VIS_CSTYLE | VIS_OCTAL); the page does not say whether -z changes this.Source: Solnix sha256sum(1) -z; FreeBSD sha256sum(1) -z, DESCRIPTION (vis(3)) |
| Linux, FreeBSD | binary mode marker | Solnix output is the checksum, a space, a mode character ('*' for binary, ' ' for text) and the name. Solnix says binary and text mode do not differ on GNU systems. FreeBSD also says it does not differentiate, but does not document the mode character. The Linux page does not describe the format. Source: Solnix sha256sum(1) DESCRIPTION; FreeBSD sha256sum(1) -t, --text; Linux sha256sum(1) DESCRIPTION |
| FreeBSD | extra FreeBSD options | FreeBSD's shared page also covers shasum, which has -a alg (default SHA-1) and -0 bits mode. The Solnix and Linux sha256sum pages have neither.Source: FreeBSD sha256sum(1) PERL OPTIONS (-0, -a); Solnix sha256sum(1) SYNOPSIS |
Standards
- POSIX: sha256sum is not a POSIX.1-2024 utility.
- Solnix: The sums are computed as described in FIPS-180-2.
Writing portable scripts
- Stick to the options all three pages share:
-b,-c,-t,-w,-z,--tag,--quiet,--status,--strictand--ignore-missing. Call the program as sha256sum, never sha256, because on FreeBSD sha256-cmeans something else. - None of the three pages shown documents exit status values. Test whether sha256sum
-csucceeds or fails, and do not parse the OK/FAILED text or the '*' marker, because only some pages document them. - On Solnix, check that sha256sum exists, or install pkgs.solnix.coreutils, before running a script that depends on it.
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.