stty(1) on Solnix vs Linux and the BSDs

On Solnix, stty is the illumos stty at /usr/bin/stty. It acts only on standard input and takes just -a and -g. It has no -f/-F option to name a device and no BSD -e. Mode names also differ from Linux and the BSDs in several places, notably flow control, tab handling and baud-rate operands.

What Solnix runs

/usr/bin/stty is the illumos stty. /usr/xpg4/bin/stty and /usr/xpg6/bin/stty are also shipped, with the synopsis [-a | -g] and then [modes]. /usr/ucb/stty is shipped too, but the bundle does not describe it. The visible Solnix text does not say how the variants differ in behaviour.

Differences

Compared withTopicWhat differs
Linuxselecting the deviceLinux stty has -F DEVICE / --file=DEVICE to open another device. The Solnix synopsis has no such option, and the page says stty acts on the device that is the current standard input. Use a shell redirection instead.
Source: Solnix stty(1) SYNOPSIS, DESCRIPTION; Linux stty(1) -F, --file
FreeBSD, OpenBSD, NetBSD-f fileThe BSDs take -f file, opened with O_NONBLOCK, so stty can reach a terminal that would block on open. Solnix has no -f.
Source: FreeBSD stty(1) -f; OpenBSD stty(1) -f; NetBSD stty(1) -f; Solnix stty(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSD-eThe BSDs have -e, which prints settings in the traditional BSD "all" and "everything" formats. Solnix has only -a and -g, so stty -e is not documented there.
Source: FreeBSD/OpenBSD/NetBSD stty(1) -e; Solnix stty(1) OPTIONS
Linuxlong optionsLinux stty accepts --all, --save, --help and --version as well as -a and -g. The Solnix page documents only -a and -g.
Source: Linux stty(1) -a, --all; -g, --save; --help; --version; Solnix stty(1) OPTIONS
OpenBSD-g outputOpenBSD documents that -g output contains no characters needing shell quoting. Solnix says -g emits termios-type output if the driver supports it, otherwise termio-type output. It does not mention quoting.
Source: OpenBSD stty(1) -g; Solnix stty(1) -g
all fourspeed operandSolnix sets the baud rate with a bare number, plus ispeed and ospeed. The visible Solnix text has no speed operand. On Linux, speed prints the terminal speed. On the BSDs, speed number sets both input and output speed.
Source: Solnix stty(1) Control Modes; Linux stty(1) Special settings (speed, N); FreeBSD/OpenBSD/NetBSD stty(1) speed number
FreeBSD, OpenBSD, NetBSDzero baud rateOn Solnix, the operand 0 and ospeed 0 hang up the line immediately. On the BSDs, a zero baud rate means modem control is no longer asserted. NetBSD adds that this will normally hang up the line.
Source: Solnix stty(1) Control Modes (0, ospeed); FreeBSD/OpenBSD/NetBSD stty(1) number, ospeed
all fourhardware flow controlSolnix crtscts enables output flow control only, and crtsxoff enables input flow control. Linux, FreeBSD, OpenBSD and NetBSD describe crtscts as plain RTS/CTS flow control. Solnix has no rtsdtr (FreeBSD) or cdtrcts (NetBSD).
Source: Solnix stty(1) crtscts, crtsxoff; Linux/FreeBSD/OpenBSD/NetBSD stty(1) crtscts; FreeBSD rtsdtr; NetBSD cdtrcts
all fourtab expansionSolnix has tab0 to tab3 as delay styles and no oxtabs in its output modes. OpenBSD and NetBSD use oxtabs to expand tabs. FreeBSD uses tab3 to enable expansion. Linux uses -tabs, the same as tab3.
Source: Solnix stty(1) Output Modes; OpenBSD/NetBSD stty(1) oxtabs; FreeBSD stty(1) tab0 tab3; Linux stty(1) tabs, -tabs
Linux, FreeBSDiutf8Linux and FreeBSD document iutf8 for UTF-8 input, so backspace deletes whole multibyte characters on FreeBSD. The Solnix input modes list does not include iutf8.
Source: Linux stty(1) Input settings (iutf8); FreeBSD stty(1) iutf8; Solnix stty(1) Input Modes
FreeBSD, NetBSDupper/lower-case mappingSolnix documents iuclc and olcuc. Linux marks them non-POSIX, and OpenBSD documents both. The visible FreeBSD and NetBSD mode lists show neither, so a script using them is not portable to those two.
Source: Solnix stty(1) iuclc, olcuc; Linux stty(1) iuclc, olcuc; OpenBSD stty(1) iuclc, olcuc; FreeBSD/NetBSD stty(1) Input Modes, Output Modes

Standards

  • POSIX: stty is a POSIX.1-2024 utility.
  • FreeBSD: -a and -g are described "as per IEEE Std 1003.2 (“POSIX.2”)".
  • NetBSD: -a and -g are described "as per IEEE Std 1003.2 (“POSIX.2”)".
  • Linux: An * marks non-POSIX settings in the page, and the underlying system defines which settings are available.

Writing portable scripts

  • Use only -a and -g in portable scripts. To act on a specific terminal, redirect standard input (for example stty ... < /dev/tty) instead of using -F or -f.
  • Save and restore state with the -g output as an argument to a later stty, and avoid platform-specific modes such as iutf8, oxtabs, crtsxoff, cdtrcts and rtsdtr.

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.