clear
Quick Reference
Command Name:
clear
Category:
terminal control
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
Syntax
clear [OPTION]
Options
Option | Description |
---|---|
-T TERM |
Use this terminal type instead of the value of $TERM |
-V |
Display version information and exit |
-x |
Do not attempt to clear terminal's scrollback buffer |
Examples
How to Use These Examples
The examples below show common ways to use the clear
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
# Clear the entire screen clear
Advanced Examples:
# Clear screen before running a script clear && ./myscript.sh