Skip to main content

Clears the screen of the terminal.

# To clear the screen (equivalent to pressing Control-L in Bash shell):
clear

# To clear the screen but keep the terminal's scrollback buffer:
clear -x

# To indicate the type of terminal to clean (defaults to the value of the environment variable 'TERM'):
clear -T <type_of_terminal>

# To show the version of 'ncurses' used by 'clear':
clear -V