clear(1) on Solnix vs Linux and the BSDs
On Solnix, clear is the illumos clear at /usr/bin/clear, which takes one optional terminal-type operand and documents no options. Linux, FreeBSD and OpenBSD ship the ncurses clear with -T, -V and -x, and NetBSD documents clear only as a tput attribute.
The manual pages
What Solnix runs
/usr/bin/clear is the illumos clear. /usr/ucb/clear is also shipped; the manual does not describe it. The ncurses clear is available from pkgs.solnix.ncurses; it has the same synopsis and options as the Linux and FreeBSD clear.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, OpenBSD | terminal type: operand vs -T | Solnix clear takes the terminal type as a positional operand, as in clear term. Linux, FreeBSD and OpenBSD take it with -T type. A script that runs clear -T vt100 uses an option the Solnix page does not document.Source: illumos clear(1) SYNOPSIS, OPERANDS; Linux clear(1) -T; FreeBSD clear(1) -T; OpenBSD clear(1) -T |
| Linux, FreeBSD, OpenBSD | -x and scrollback | The Solnix page says clear clears the screen; it mentions no scrollback buffer and no -x. The ncurses clear on Linux, FreeBSD and OpenBSD also clears the scrollback (the E3 capability) unless -x is given.Source: illumos clear(1) SYNOPSIS, DESCRIPTION; Linux clear(1) DESCRIPTION, -x; FreeBSD clear(1) -x; OpenBSD clear(1) -x |
| Linux, FreeBSD, OpenBSD | -V version option | The Solnix clear page documents no -V. Linux, FreeBSD and OpenBSD clear -V report the ncurses version and exit.Source: illumos clear(1) SYNOPSIS; Linux clear(1) -V; FreeBSD clear(1) -V; OpenBSD clear(1) -V |
| Linux, FreeBSD | same program as the Solnix alternative | The clear from pkgs.solnix.ncurses has the same synopsis and options (-x, -T, -V) as the Linux and FreeBSD clear: it is the ncurses clear.Source: Solnix clear(1) from pkgs.solnix.ncurses SYNOPSIS, OPTIONS; Linux clear(1) SYNOPSIS; FreeBSD clear(1) SYNOPSIS |
| NetBSD | NetBSD page is tput(1) | NetBSD's clear(1) page is the tput page, with NAME 'tput, clear'. Its SYNOPSIS lists only tput, and clear appears as a tput attribute (tput clear). The page documents no standalone clear syntax or options other than tput -T.Source: NetBSD clear(1) NAME, SYNOPSIS, DESCRIPTION (special attributes: clear) |
| OpenBSD | redirected output | OpenBSD documents that clear writes its escape sequence to standard output. Redirecting it to a file stops the screen being cleared, and you can cat the file later. The Solnix page does not say where clear writes. Source: OpenBSD clear(1) DESCRIPTION; illumos clear(1) DESCRIPTION |
Everyday tasks
| Task | Solnix | Linux | FreeBSD | OpenBSD | NetBSD |
|---|---|---|---|---|---|
| clear the terminal screen | clear | clear | clear | clear | tput clear |
| clear the screen for a given terminal type | clear term | clear -T terminal-type | clear -T terminal-type | clear -T type | tput -T term clear |
Standards
- POSIX: clear is not a POSIX.1-2024 utility.
Writing portable scripts
- Run plain clear with no options, or tput clear, which the NetBSD page documents. Do not rely on
-x,-Tor-V, which the Solnix illumos clear does not document. - To clear a specific terminal type, set TERM in the environment rather than passing
-Tor a term operand.
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.