Sign in

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.

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 withTopicWhat differs
Linux, FreeBSD, OpenBSDterminal type: operand vs -TSolnix 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 scrollbackThe 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 optionThe 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, FreeBSDsame program as the Solnix alternativeThe 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
NetBSDNetBSD 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)
OpenBSDredirected outputOpenBSD 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

TaskSolnixLinuxFreeBSDOpenBSDNetBSD
clear the terminal screenclearclearclearcleartput clear
clear the screen for a given terminal typeclear termclear -T terminal-typeclear -T terminal-typeclear -T typetput -T term clear

Standards

Writing portable scripts

  • Run plain clear with no options, or tput clear, which the NetBSD page documents. Do not rely on -x, -T or -V, which the Solnix illumos clear does not document.
  • To clear a specific terminal type, set TERM in the environment rather than passing -T or 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.