Sign in

tput(1) on Solnix vs Linux and the BSDs

On Solnix, tput is the illumos tput at /usr/bin/tput, which accepts only -T and -S, with no -V, -x or -v. Its page does not describe the ncurses behaviours that Linux, FreeBSD and OpenBSD document, such as reset putting the tty into a sane mode.

What Solnix runs

A default Solnix system runs the illumos tput at /usr/bin/tput; no other illumos variants are shipped. The ncurses tput(1) is published by pkgs.solnix.ncurses and is not on PATH by default. Unlike /usr/bin/tput it has -V and -x, and its synopsis matches the Linux and FreeBSD ones except that it lacks -v.

Differences

Compared withTopicWhat differs
Linux, FreeBSDthe ncurses packageThe pkgs.solnix.ncurses tput(1) is an ncurses tput like the Linux (ncurses-6.6) and FreeBSD 15.1 pages, but has no -v, and its init also sets the entry's delays in the terminal driver, which theirs omit. /usr/bin/tput is a different program.
Source: Solnix tput(1) from pkgs.solnix.ncurses SYNOPSIS, Operands; Linux tput(1) SYNOPSIS, Operands; FreeBSD tput(1) SYNOPSIS, Operands
Linux, FreeBSD, OpenBSD-V version optionSolnix /usr/bin/tput documents no -V. Linux, FreeBSD and OpenBSD list tput -V; OpenBSD says it reports the ncurses version used in the program.
Source: illumos tput(1) SYNOPSIS, OPTIONS; Linux and FreeBSD tput(1) SYNOPSIS; OpenBSD tput(1) -V
Linux, FreeBSD, OpenBSD-x and scrollbackSolnix /usr/bin/tput has no -x. Linux and FreeBSD list [-x] clear in the synopsis. OpenBSD documents -x as not trying to clear the scrollback buffer through the extended E3 capability. The Solnix page documents no scrollback clearing.
Source: illumos tput(1) SYNOPSIS; Linux and FreeBSD tput(1) SYNOPSIS; OpenBSD tput(1) -x
Linux, FreeBSD-v optionThe Linux and FreeBSD synopses show a -v flag on every form of tput. The Solnix, OpenBSD and NetBSD synopses have no -v, and the pkgs.solnix.ncurses page has none either.
Source: Linux and FreeBSD tput(1) SYNOPSIS; illumos, OpenBSD and NetBSD tput(1) SYNOPSIS; Solnix tput(1) from pkgs.solnix.ncurses SYNOPSIS
NetBSD-S and multiple capabilitiesSolnix -S reads one capname per line from standard input and changes what exit statuses 0 and 1 mean. NetBSD tput has no -S but takes several attributes on one command line, and its exit status reflects only the last.
Source: illumos tput(1) -S, EXIT STATUS; NetBSD tput(1) SYNOPSIS, EXIT STATUS
Linux, FreeBSD, OpenBSDreset sets tty modesOn Linux, FreeBSD and OpenBSD, tput reset puts the terminal modes in a sane state (cooked and echo on, cbreak and raw off, newline translation on). The Solnix page says reset sends the reset strings, or the init strings if there are none.
Source: illumos tput(1) OPERANDS reset; Linux and FreeBSD tput(1) Operands reset; OpenBSD tput(1) Commands reset
Linux, FreeBSD, OpenBSDinit and tty or window stateThe Linux, FreeBSD and OpenBSD pages say init checks stderr, stdout, stdin and /dev/tty for tty settings and may update the kernel's window size. The Solnix page lists only strings, delays and tab handling.
Source: illumos tput(1) OPERANDS init; Linux and FreeBSD tput(1) Operands init; OpenBSD tput(1) Commands init
NetBSDinit stringsNetBSD init sends only the terminfo is2 sequence. Solnix init sends is1, is2, is3, if and iprog.
Source: NetBSD tput(1) init, reset, BUGS; illumos tput(1) OPERANDS init, reset
NetBSDexit statusesSolnix documents 2 for a usage error, 3 for no information on the terminal type, 4 for an invalid operand, above 4 for other errors, and -1 for an undefined numeric capname. NetBSD documents only 0, 1, and 2 for any error.
Source: illumos tput(1) EXIT STATUS; NetBSD tput(1) EXIT STATUS
Linux, FreeBSDundefined numeric capabilityFor a numeric capability the terminal does not define, Linux and FreeBSD print -1 and a newline on standard output. The Solnix page lists -1 under EXIT STATUS for that case (tput -T450 lines), not as output.
Source: illumos tput(1) EXIT STATUS (-1); Linux tput(1) DESCRIPTION (numeric); FreeBSD tput(1) DESCRIPTION (numeric)
Linux, FreeBSD, OpenBSDinvocation as clear, init or resetLinux, FreeBSD and OpenBSD document that tput run through a link named clear, init or reset acts as that operand. The Solnix page does not document this.
Source: Linux and FreeBSD tput(1) Aliases; OpenBSD tput(1) Aliases; illumos tput(1) DESCRIPTION

Everyday tasks

TaskSolnixLinuxFreeBSDOpenBSDNetBSD
clear the screentput cleartput cleartput cleartput cleartput clear
initialize the terminaltput inittput inittput inittput inittput init
reset the terminaltput resettput resettput resettput resettput reset
print the number of terminal columnstput colstput colstput colstput cols—
move the cursor to a row and columntput cup row columntput cup row columntput cup row columntput cup row column—
print the long name of the terminal typetput longnametput longnametput longnametput longnametput longname
run several capabilities from standard inputtput -S <<!tput -S <<!tput -S <<!tput -S <<!—
query a capability for a given terminal typetput -T type colstput -T type colstput -T type cols——

Standards

  • POSIX: tput is a POSIX.1-2024 utility.
  • Solnix: ATTRIBUTES: Interface Stability is Standard. SEE ALSO refers to standards(7).

Writing portable scripts

  • Stick to tput [-T type] capname [args], plus clear, init, reset and longname. Do not use -V, -x or -v, which the base Solnix tput lacks.
  • Check $? after tput before using its output, as the Solnix, Linux, FreeBSD and OpenBSD pages advise. Do not rely on exit codes above 2, since NetBSD documents only 0, 1 and 2.

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.