chcon(1) on Solnix vs Linux and the BSDs

chcon is not in the Solnix base system; it comes from pkgs.solnix.coreutils, which is GNU coreutils. Its page matches the Linux GNU chcon page option for option. The BSD counterparts are not in the bundle, so the manual does not say whether they have an equivalent.

What Solnix runs

Not installed by default: add pkgs.solnix.coreutils. The bundle lists no illumos variant of chcon and no /usr/bin entry for it. The page is GNU coreutils 9.7 (April 2025). The Linux counterpart in the bundle is from coreutils-full-9.11.

Differences

Compared withTopicWhat differs
Linuxsame programThe Solnix page and the Linux page describe the same GNU coreutils chcon. The synopsis forms and every option are the same: -h, -u, -r, -t, -l, -R, -v, -H, -L, -P, --reference, --preserve-root and --no-preserve-root. Only the coreutils version differs, 9.7 on Solnix and 9.11 on Linux.
Source: Solnix chcon(1) SYNOPSIS, DESCRIPTION; Linux chcon(1) SYNOPSIS, DESCRIPTION; flag lists identical
FreeBSD, OpenBSD, NetBSDno counterpart pageThe bundle has no chcon page or SELinux context-changing page for FreeBSD, OpenBSD or NetBSD. The manual does not say how to set a security context on those systems, so a script that calls chcon cannot be assumed to work there.
Source: Bundle header lists only a Linux counterpart; Solnix chcon(1) DESCRIPTION
Linuxnot in the base systemOn Linux the chcon page comes with coreutils. On Solnix the command is not on PATH by default: install pkgs.solnix.coreutils first. Scripts that assume chcon exists will fail on a default Solnix system.
Source: Bundle header (on a default Solnix system the command on PATH is: none: install pkgs.solnix.coreutils)
LinuxSELinux wording on SolnixThe Solnix page says chcon changes the SELinux security context, as the Linux page does. The Solnix page does not say whether a default Solnix system has an SELinux policy or enforcement. The manual does not say what chcon does on a system without SELinux.
Source: Solnix chcon(1) DESCRIPTION; Linux chcon(1) DESCRIPTION
Linux-P default statedThe Linux page states in the traversal paragraph that -P is the default. The Solnix page states it on the -P entry itself, as (default). The behaviour is the same on both: no symbolic links are traversed with -R unless -H or -L is given.
Source: Solnix chcon(1) -P; Linux chcon(1) paragraph before -H, -L, -P

Standards

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

Writing portable scripts

  • Check that chcon is on PATH before calling it. It is not in the Solnix base system, and the bundle shows no BSD counterpart.

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.