bzip2(1) on Solnix vs Linux and the BSDs

bzip2 is not in the Solnix base system: install pkgs.solnix.bzip2. The Solnix page text in the bundle is empty, so no Solnix-specific difference can be confirmed. The Linux and FreeBSD pages describe the same bzip2 1.0.8 program, and the NetBSD page documents the same program in a different layout.

What Solnix runs

Not installed by default: add pkgs.solnix.bzip2. The published Solnix page (implementation: bzip2) has no text in the bundle and no extracted option flags, and no other illumos variants are listed. Whatever the Solnix page says about options, exit status or environment variables cannot be checked here.

Differences

Compared withTopicWhat differs
Linux, FreeBSDsame program as Solnix packageLinux and FreeBSD ship the same bzip2 1.0.8 manual, with identical SYNOPSIS and options. Solnix publishes an implementation named bzip2, but its page text is empty in the bundle, so the manual cannot confirm that it matches.
Source: Linux bzip2(1) NAME, SYNOPSIS; FreeBSD bzip2(1) NAME, SYNOPSIS; Solnix bzip2(1) (no text in bundle)
all fournot in base systemOn a default Solnix system there is no bzip2 on PATH; install pkgs.solnix.bzip2 first. Scripts that call bzip2, bunzip2 or bzcat will fail until the package is added.
Source: Bundle header: 'none: install pkgs.solnix.bzip2'
Linux, FreeBSDBZIP2 and BZIP environment variablesLinux and FreeBSD bzip2 read arguments from the environment variables BZIP2 and BZIP, in that order, before the command line. The NetBSD text in the bundle does not mention them. The Solnix page text is not available.
Source: Linux bzip2(1) DESCRIPTION; FreeBSD bzip2(1) DESCRIPTION; NetBSD bzip2(1) DESCRIPTION (no mention)
Linux, FreeBSDexit status documentedLinux and FreeBSD document exit values: 0 normal, 1 environmental problems (file not found, invalid flags, I/O errors), 2 corrupt compressed file, 3 internal consistency error. The NetBSD text in the bundle has no such list.
Source: Linux bzip2(1) DESCRIPTION 'Return values'; FreeBSD bzip2(1) DESCRIPTION 'Return values'; NetBSD bzip2(1) DESCRIPTION
NetBSD-2 to -8 and block-size optionsThe NetBSD page lists -1 to -9 individually in its synopsis and flags, and documents -1/--fast and -9/--best together as block-size settings. The Linux and FreeBSD flag lists show only -1 and -9, though their synopses include 123456789.
Source: NetBSD bzip2(1) SYNOPSIS, OPTIONS -1, --fast / -9, --best; Linux bzip2(1) SYNOPSIS; FreeBSD bzip2(1) SYNOPSIS
NetBSD-- end-of-optionsThe NetBSD page documents '--' as treating all later arguments as file names, with the example 'bzip2 -- -myfilename'. In the visible Linux and FreeBSD text it is not documented, because that part is trimmed or absent.
Source: NetBSD bzip2(1) OPTIONS '--'; Linux bzip2(1) OPTIONS; FreeBSD bzip2(1) OPTIONS
Linux, FreeBSD, NetBSDfile name guessing on decompressAll three counterparts map .bz2 and .bz to the bare name, .tbz2 and .tbz to .tar, and any other name to name.out. Scripts can rely on this on those systems; the Solnix behaviour is not documented in the bundle.
Source: Linux, FreeBSD and NetBSD bzip2(1) DESCRIPTION (filename table)
Linux, FreeBSD, NetBSDoverwrite and pass-through with -fBy default bzip2 and bunzip2 do not overwrite existing files. With -f they overwrite, break hard links, and pass through unchanged any file lacking the bzip2 magic bytes, as GNU gzip does.
Source: Linux, FreeBSD and NetBSD bzip2(1) OPTIONS -f, --force

Standards

  • POSIX: bzip2 is not a POSIX.1-2024 utility.

Writing portable scripts

  • Check that bzip2 is on PATH first; on Solnix it needs pkgs.solnix.bzip2. Do not assume it is in the base system.
  • Use only -c, -d, -k, -f, -t, and -1 to -9, which appear in the Linux, FreeBSD and NetBSD pages. Do not rely on the BZIP2 environment variable, which the NetBSD text does not mention.

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.