The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

clear : Clearing the Terminal Screen

 

The clear command is used to clear the terminal screen, similar to the "cls" command in DOS. It effectively hides all previously executed commands and their output, giving you a clean and empty terminal window. This can be especially useful when your terminal becomes cluttered with a lot of output and you want to start with a fresh, clear screen.

The clear command doesn't require any arguments or options. You simply need to type clear in the terminal and press Enter.

Here's an example:
$ echo "Hello World!" ← display〝Hello World!〞
Hello World!
$ clear ←clear the terminal screen

Sometimes, the clear command might not be able to clear the screen completely. In such cases, you can use the reset command to reset the screen.