Linux clear Command with Examples
clear is built-in command which is used to clear terminal screen.
This command runs on different distributions of Linux based operating systems like Ubuntu, Fedora, Debian, Kali, Red Hat etc. In this tutorial we will discuss syntax for command
echo with examples.
The syntax for command
$ echo Alex Alex $ echo Hello Hello $ echo Linux Linux $ clear
In addition to clearing terminal window, clear does following things:
clearclears your screen if this is possible, including its scrollback buffer.
clearlooks in the environment for the terminal type given by the environment variable
TERM, and then in the terminfo databas to determine how to clear the screen.
clearwrites to the standard output. You can redirect the standard output to a file (which prevents
clearfrom actually clearing the screen), and later
catthe file to the screen, clearing it at that point.
For more detail, run
man clear on terminal to get complete information about