tput(1) on Solnix vs Linux and the BSDs
On a default Solnix system, tput is the illumos /usr/bin/tput, which accepts only -T and -S. The published Solnix page describes the ncurses tput (pkgs.solnix.ncurses), which adds -V, -x and link aliases like Linux and FreeBSD. Scripts that rely on those ncurses features break on the default binary.
The manual pages
What Solnix runs
The published tput(1) page comes from pkgs.solnix.ncurses, but the tput on PATH by default is the illumos one at /usr/bin/tput. No other illumos variants are shipped. To get the ncurses behaviour described on the published page, add pkgs.solnix.ncurses. The illumos page lists Interface Stability: Standard.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, OpenBSD | -V and -x on the default binary | The illumos tput on PATH has only -T and -S. The ncurses synopses on Solnix (published page), Linux, FreeBSD and OpenBSD also list -V (version) and -x for clear. OpenBSD says -x skips clearing the scrollback buffer with the extended E3 capability.Source: Solnix default illumos tput(1) SYNOPSIS, OPTIONS; Solnix published tput(1) SYNOPSIS; Linux tput(1) SYNOPSIS; FreeBSD tput(1) SYNOPSIS; OpenBSD tput(1) -V, -x |
| Linux, FreeBSD | -v option | The Linux and FreeBSD synopses accept a -v option on every form. The illumos tput, the published Solnix page and the OpenBSD and NetBSD pages have no -v. The trimmed bundle does not show what -v does.Source: Linux tput(1) SYNOPSIS; FreeBSD tput(1) SYNOPSIS; Solnix tput(1) SYNOPSIS; OpenBSD tput(1) SYNOPSIS; NetBSD tput(1) SYNOPSIS |
| NetBSD | -S missing on NetBSD | NetBSD tput has only -T. There is no -S to read several capabilities from standard input, no -V and no -x. Solnix (both implementations), Linux, FreeBSD and OpenBSD all document -S.Source: NetBSD tput(1) SYNOPSIS, DESCRIPTION; Solnix default illumos tput(1) -S; Solnix published tput(1) -S |
| all four | parameter handling | The illumos tput passes an all-numeric argument as a number. The ncurses pages (Solnix published, Linux, FreeBSD, OpenBSD) use a built-in table to choose which capabilities take string parameters, and tparm for substitution. The NetBSD page does not say. Source: Solnix default illumos tput(1) OPERANDS parm; Solnix published tput(1) Operands cap-code; OpenBSD tput(1) capname |
| Linux, FreeBSD, OpenBSD | reset and terminal modes | With ncurses (Solnix published page, Linux, FreeBSD, OpenBSD), reset first puts the tty modes into a sane state: cooked and echo on, cbreak and raw off. The illumos page describes reset only as outputting reset strings, falling back to initialization strings. Source: Solnix default illumos tput(1) reset; Solnix published tput(1) reset; Linux tput(1) reset; OpenBSD tput(1) reset |
| NetBSD | init and reset on NetBSD | NetBSD describes init as the is2 sequence and reset as the rs1, rs2, rs3 and rf sequence. It does not describe the tty-mode, tab or window-size handling that illumos and ncurses document. Its BUGS section says init may be more useful than reset. Source: NetBSD tput(1) DESCRIPTION, BUGS; Solnix default illumos tput(1) init, reset |
| Linux, FreeBSD, OpenBSD | link aliases | The ncurses tput acts as clear, init or reset when invoked through a link of that name. The illumos page documents no such behaviour. The Solnix ncurses page says clear is normally a separate program. Source: Solnix published tput(1) Aliases; Linux tput(1) Aliases; OpenBSD tput(1) Aliases; Solnix default illumos tput(1) DESCRIPTION |
| all four | numeric capability not defined | The ncurses pages say tput writes -1 on standard output for an undefined numeric capability. The illumos page lists exit status -1 for that case, for example tput -T450 lines, and gives exit 0 for integer capabilities.Source: Solnix published tput(1) numeric; Linux tput(1) numeric; Solnix default illumos tput(1) EXIT STATUS |
| all four | exit statuses on illumos | The illumos page defines exit 2 for usage errors, 3 for no information about the terminal type, 4 for an invalid operand and >4 for other errors. NetBSD documents only 0, 1 and 2. Other EXIT STATUS sections are trimmed. Source: Solnix default illumos tput(1) EXIT STATUS; NetBSD tput(1) EXIT STATUS |
| NetBSD | exit status with several attributes | NetBSD takes its exit status from the last attribute given. For string and integer attributes, exit 0 means the attribute is defined and 1 means it is not. The illumos page says integer capabilities exit 0 and says nothing about several operands. Source: NetBSD tput(1) EXIT STATUS; Solnix default illumos tput(1) EXIT STATUS |
| Linux, FreeBSD, OpenBSD | -T and LINES/COLUMNS | With -T, the illumos tput ignores the shell variables LINES and COLUMNS and the layer size. OpenBSD ignores LINES and COLUMNS. The Solnix ncurses page says -T makes tput ignore the environment variables and use the OS or terminal database.Source: Solnix default illumos tput(1) -T; OpenBSD tput(1) -T; Solnix published tput(1) Terminal Size |
Standards
- POSIX: tput is a POSIX.1-2024 utility.
- Solnix: The illumos tput page lists Interface Stability: Standard. It describes clear, init, reset and longname as supported in the C locale.
- NetBSD: The tput command appears in 4.4BSD (HISTORY).
Writing portable scripts
- Stick to tput [
-Ttype] capname [parm]... with common capabilities such as cols, lines, clear and cup. Do not use-V,-xor-v, and do not rely on-S: the illumos tput lacks-V,-xand-v, and NetBSD lacks-S. - Test tput's exit status before using its output. A numeric capability may print
-1(ncurses) or exit-1(illumos) when undefined.
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.