runcon(1) on Solnix vs Linux and the BSDs

runcon is the GNU coreutils command that runs a program in a given SELinux security context. It is not in the Solnix base system; install pkgs.solnix.coreutils. The Solnix and Linux pages are the same program, and the bundle has no FreeBSD, OpenBSD or NetBSD counterpart page.

What Solnix runs

Not installed by default: add pkgs.solnix.coreutils. No illumos variant is shipped. The published Solnix page is GNU coreutils 9.7 (April 2025). The page describes SELinux contexts, but the manual does not say whether the Solnix kernel supports SELinux.

Differences

Compared withTopicWhat differs
Linuxsame programThe Solnix page is GNU coreutils runcon, and its options, description and exit statuses match the Linux page. The only SYNOPSIS difference is that Solnix shows the CONTEXT COMMAND form as a required first line, and Linux shows it in brackets.
Source: Solnix runcon(1) SYNOPSIS, OPTIONS, Exit status; Linux runcon(1) SYNOPSIS, OPTIONS, Exit status
Linuxnot in base systemOn Solnix, runcon is not on PATH by default. Install pkgs.solnix.coreutils to get it. The Linux page comes from a coreutils-full-9.11 package.
Source: Solnix bundle header (none: install pkgs.solnix.coreutils); Linux runcon(1) header release
FreeBSD, OpenBSD, NetBSDno counterpart pageThe bundle has no runcon page for FreeBSD, OpenBSD or NetBSD, so the manual gives no BSD equivalent to compare. Do not assume a runcon command exists there.
Source: Bundle header lists only a linux counterpart
all fourexit statusruncon returns 125 if runcon itself fails, 126 if COMMAND is found but cannot be invoked, 127 if COMMAND is not found, and otherwise the exit status of COMMAND. Solnix and Linux document the same values.
Source: Solnix runcon(1) Exit status; Linux runcon(1) Exit status
Linuxno argumentsWith neither CONTEXT nor COMMAND, runcon prints the current security context. Both pages say this in DESCRIPTION. Only the Linux SYNOPSIS shows the whole CONTEXT COMMAND form as optional.
Source: Solnix runcon(1) DESCRIPTION; Linux runcon(1) SYNOPSIS, DESCRIPTION

Standards

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

Writing portable scripts

  • Do not rely on runcon being present. On Solnix it needs pkgs.solnix.coreutils, and the manual gives no equivalent on the BSDs. Check with command -v runcon first.
  • Use the exit statuses 125, 126 and 127 to tell a runcon failure from a failure of the wrapped command.

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.