nproc(1) on Solnix vs Linux and the BSDs

nproc is not in the Solnix base system. Install pkgs.solnix.coreutils to get the GNU coreutils nproc, which is the same program as on Linux. The Solnix page does not document the OpenMP environment variables that the Linux page says change the result.

What Solnix runs

Not installed by default: add pkgs.solnix.coreutils. The published page is GNU coreutils 9.7 and no other illumos variant is shipped, so there is no illumos text to compare.

Differences

Compared withTopicWhat differs
Linuxsame programSolnix publishes GNU coreutils nproc with the same synopsis and the same options as Linux: --all, --ignore=N, --help and --version. Core behaviour is the same, apart from the wording differences listed below.
Source: Solnix nproc(1) SYNOPSIS, DESCRIPTION; Linux nproc(1) SYNOPSIS, DESCRIPTION
LinuxOpenMP environment variablesThe Linux page says OMP_NUM_THREADS sets the minimum and OMP_THREAD_LIMIT sets the maximum value returned. The Solnix page does not mention them. The manual does not say whether the Solnix build honours them.
Source: Linux nproc(1) DESCRIPTION; Solnix nproc(1) DESCRIPTION
Linux--all and CPU quotasLinux documents that --all disregards OpenMP environment variables and CPU quotas. The Solnix page only says it prints the number of installed processors.
Source: Linux nproc(1) --all; Solnix nproc(1) --all
Linux--ignore lower boundLinux guarantees the --ignore result is at least 1. The Solnix page says only 'if possible, exclude N processing units' and gives no minimum.
Source: Linux nproc(1) --ignore; Solnix nproc(1) --ignore
FreeBSDdefault countFreeBSD nproc prints the processors in the current process's cpuset(2) unless --all is given. Solnix prints the processing units available to the current process, which the page says may be fewer than the online processors. The Solnix page does not mention cpuset.
Source: FreeBSD nproc(1) DESCRIPTION; Solnix nproc(1) DESCRIPTION
FreeBSD--all meaningFreeBSD --all counts processors currently online. Solnix --all prints the number of installed processors. The FreeBSD BUGS section says only active threads are reported on FreeBSD, unlike Linux, when HyperThreading is disabled in the kernel but enabled in BIOS.
Source: FreeBSD nproc(1) --all, BUGS; Solnix nproc(1) --all
FreeBSD--ignore floorFreeBSD --ignore=count decreases the result but never below 1. The Solnix page documents no floor.
Source: FreeBSD nproc(1) --ignore; Solnix nproc(1) --ignore
FreeBSDavailability and originFreeBSD ships nproc in base since 13.2 and says it is meant to be compatible with GNU coreutils nproc. On Solnix it is a separate package, not in the base system.
Source: FreeBSD nproc(1) HISTORY, COMPATIBILITY; Solnix nproc(1) header
OpenBSD, NetBSDno counterpart pageThe bundle has no OpenBSD or NetBSD nproc page, so the manual gives no comparison for them. Do not assume nproc exists there.
Source: Bundle header lists only linux and freebsd counterparts

Standards

  • POSIX: nproc is not a POSIX.1-2024 utility.
  • FreeBSD: The FreeBSD page states the program is intended to be compatible with nproc in GNU coreutils; it cites no other standard.

Writing portable scripts

  • Do not rely on nproc being installed: on Solnix it needs pkgs.solnix.coreutils, and the bundle shows no page for OpenBSD or NetBSD. Check with command -v nproc and fall back to another method.
  • Do not depend on the exact meaning of the count with --all or on the OpenMP variables. Linux, FreeBSD and Solnix describe them differently. If you use --ignore, clamp the result to at least 1 yourself.

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.