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.
The manual pages
- Solnix: stty(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: stty(1) coreutils-full-9.11
- FreeBSD: stty(1) 15.1-RELEASE
- OpenBSD: stty(1) 8.0
- NetBSD: stty(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
stty
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 with | Topic | What differs |
|---|---|---|
| Linux | selecting the device | Linux 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 file | The 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 | -e | The 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 |
| Linux | long options | Linux 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 output | OpenBSD 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 four | speed operand | Solnix 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, NetBSD | zero baud rate | On 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 four | hardware flow control | Solnix 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 four | tab expansion | Solnix 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, FreeBSD | iutf8 | Linux 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, NetBSD | upper/lower-case mapping | Solnix 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:
-aand-gare described "as per IEEE Std 1003.2 (“POSIX.2”)". - NetBSD:
-aand-gare 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
-aand-gin portable scripts. To act on a specific terminal, redirect standard input (for example stty ... < /dev/tty) instead of using-For-f. - Save and restore state with the
-goutput 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.