Forever & AlwaysLINUX COMMAND ATLAS

LINUX COMMAND ATLAS · COMMAND GUIDE

Linux clear command

Clear the visible contents of the terminal screen.

ncurses

Syntax

Command form
clear [-T TYPE] [-V] [-x]

Common options

3 options
OptionWhat it does
-T TYPESet the terminal type instead of using TERM.
-V, --versionDisplay the version and exit.
-xDo not attempt to clear the terminal's scrollback buffer.

Usage examples

2 examples

Clear the visible contents of the terminal screen.

clear

Clear the screen while leaving the scrollback buffer intact.

clear -x

Notes

Options vary by terminal implementation; clear usually uses the TERM setting and terminfo database.