stdbuf(1) on Solnix vs Linux and the BSDs

stdbuf is not in the Solnix base system. It comes from pkgs.solnix.coreutils and is the GNU coreutils 9.7 stdbuf, the same program as on Linux. FreeBSD's stdbuf has the same -e, -i and -o options but a different synopsis and a different buffer-definition syntax.

What Solnix runs

Not installed by default: add pkgs.solnix.coreutils. The Solnix page is the GNU coreutils 9.7 page, dated April 2025. The bundle lists no other Solnix variants, and it does not say whether a different stdbuf exists in the base system.

Differences

Compared withTopicWhat differs
Linuxsame programSolnix and Linux document the same GNU coreutils stdbuf. The synopsis, the -i/-o/-e and --input/--output/--error options, the MODE syntax, the exit statuses and the BUGS text match. Only the version differs: Solnix is coreutils 9.7, the Linux page is from coreutils-full-9.11.
Source: Solnix stdbuf(1) SYNOPSIS, DESCRIPTION, BUGS; Linux stdbuf(1) SYNOPSIS, DESCRIPTION, BUGS
FreeBSDlong optionsSolnix accepts --input=MODE, --output=MODE and --error=MODE, plus --help and --version. The FreeBSD page documents only -e, -i and -o. Scripts written for FreeBSD work, but Solnix scripts that use long options fail on FreeBSD.
Source: Solnix stdbuf(1) DESCRIPTION (-i, --input=MODE; -o, --output=MODE; -e, --error=MODE); FreeBSD stdbuf(1) SYNOPSIS and options
FreeBSDbuffer definition syntaxSolnix MODE is L (line buffered), 0 (unbuffered) or a number with an optional suffix such as K, KB, M or KiB (fully buffered, size in bytes). The FreeBSD options take a bufdef, and the page points to a BUFFER DEFINITION section. That section is not in the bundle, so the FreeBSD syntax cannot be compared.
Source: Solnix stdbuf(1) DESCRIPTION (MODE); FreeBSD stdbuf(1) -e, -i, -o (bufdef, BUFFER DEFINITION)
FreeBSDcommand is optional on FreeBSDThe Solnix synopsis is stdbuf OPTION... COMMAND, so at least one option and a command are expected. The FreeBSD synopsis puts every option and the command in brackets, so all are optional.
Source: Solnix stdbuf(1) SYNOPSIS; FreeBSD stdbuf(1) SYNOPSIS
FreeBSDexit statusSolnix documents exit status 125 (stdbuf itself fails), 126 (COMMAND found but cannot be invoked), 127 (COMMAND not found), and otherwise the status of COMMAND. The FreeBSD page has no exit status section in the bundle.
Source: Solnix stdbuf(1) Exit status; FreeBSD stdbuf(1) (no EXIT STATUS section)
FreeBSDhow it works and limitsThe FreeBSD page says stdbuf relies on libstdbuf(3), loaded and configured through environment variables. The Solnix page does not describe the mechanism. It says a COMMAND that sets its own buffering (tee) overrides stdbuf, and that dd and cat do not use streams and are unaffected.
Source: FreeBSD stdbuf(1) DESCRIPTION; Solnix stdbuf(1) DESCRIPTION (NOTE)
Linux, FreeBSDline buffering on stdinOn Solnix and Linux, MODE L is invalid for standard input. The FreeBSD text in the bundle does not say whether an equivalent restriction exists.
Source: Solnix stdbuf(1) DESCRIPTION (MODE L); Linux stdbuf(1) DESCRIPTION; FreeBSD stdbuf(1) (not stated)
LinuxGLIBC bug noteThe BUGS text says that on GLIBC platforms, giving a buffer size (fully buffered mode) gives undefined operation. It is carried over unchanged on Solnix. The bundle does not say which C library Solnix uses, so how this applies there is not stated.
Source: Solnix stdbuf(1) BUGS; Linux stdbuf(1) BUGS

Standards

  • POSIX: stdbuf is not a POSIX.1-2024 utility.
  • FreeBSD: HISTORY: the stdbuf utility first appeared in FreeBSD 8.4. The page has no STANDARDS section.

Writing portable scripts

  • Use only the short options -i, -o and -e, with L, 0 or a plain byte count, and always give a command. These are the forms the Solnix, Linux and FreeBSD pages share, but check the FreeBSD BUFFER DEFINITION syntax first.
  • On Solnix, check that stdbuf exists (install pkgs.solnix.coreutils) before relying on it. Do not expect it to affect dd, cat or programs that set their own buffering, such as tee.

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.