dir(1) on Solnix vs Linux and the BSDs

dir is the GNU coreutils dir, published by pkgs.solnix.coreutils. It is not in the base system and must be installed. The Solnix and Linux pages are the same program, and the bundle has no BSD counterpart page for it.

What Solnix runs

Not installed by default: add pkgs.solnix.coreutils. The bundle lists no other illumos variants of dir. The bundle does not say what /usr/bin/ls on Solnix is. The Solnix page header reads GNU coreutils 9.7, and the Linux counterpart is from coreutils-full-9.11.

Differences

Compared withTopicWhat differs
Linuxsame programThe Solnix and Linux dir pages have the same SYNOPSIS, the same option list and the same exit status text. Behaviour should match Linux dir. The only wording difference found is under --file-type, where Linux says 'like -F' and Solnix says 'likewise'.
Source: Solnix dir(1) SYNOPSIS, OPTIONS; Linux dir(1) SYNOPSIS, OPTIONS, --file-type
Linuxrelease skewThe Solnix page is stamped GNU coreutils 9.7 (April 2025). The Linux counterpart is listed as coreutils-full-9.11. The two option lists are identical, so the bundle shows no option added or removed between them.
Source: Solnix dir(1) footer (GNU coreutils 9.7); bundle header COUNTERPART linux (coreutils-full-9.11)
FreeBSD, OpenBSD, NetBSDno dir command in the bundleThe bundle has no dir(1) page for FreeBSD, OpenBSD or NetBSD. The manual text here does not say whether those systems ship dir. Do not assume it exists on a BSD.
Source: Bundle header: only a linux COUNTERPART is listed
all fournot in the base systemA default Solnix system has no dir on PATH. Install pkgs.solnix.coreutils to get it.
Source: Bundle header: 'On a default Solnix system the command on PATH is: none: install pkgs.solnix.coreutils'
Linuxcolour is off by defaultColour is off by default and with --color=never. --color=auto emits colour codes only when standard output is a terminal. LS_COLORS changes the settings, and dircolors(1) sets it. This matches the Linux page, so Linux scripts need no change.
Source: Solnix dir(1) DESCRIPTION (WHEN argument, LS_COLORS); Linux dir(1) same section
Linux-v, -G and -T meaningsOn Solnix dir, -v is a natural (version) sort, -G is --no-group and -T is --tabsize. These are the same as on Linux dir. They differ from the Solnix illumos ls, which the bundle shows only through the example ls page, not through this one.
Source: Solnix dir(1) -v, -G, -T; Linux dir(1) -v, -G, -T
Linuxexit statusdir exits 0 if OK, 1 for minor problems such as an inaccessible subdirectory, and 2 for serious trouble such as an inaccessible command-line argument. The Linux text is cut off in the bundle, but the Solnix text is complete.
Source: Solnix dir(1) Exit status; Linux dir(1) Exit status (truncated in bundle)

Standards

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

Writing portable scripts

  • Do not rely on dir in portable scripts. It is a GNU coreutils command, absent from the Solnix base system, and the bundle shows no BSD page for it. Use ls with POSIX options instead.

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.