Shell
clear
Clear the terminal screen.
terminalscreenshelldisplay
Additional Notes
clear clears the visible terminal screen by sending terminal control sequences. It makes the display easier to read but does not delete command history.
Use it during interactive work when output has become cluttered.
Syntax
clear
Parameters
- No arguments are normally needed.
options: Some versions support help/version flags.
Common Options
-x: Do not clear scrollback on some implementations.-T TERM: Use a specific terminal type on some implementations.--help: Show help.
Examples
clear
Clear the terminal display.
printf '\033c'
Reset-style escape sequence often used when a terminal is badly disturbed.
history | tail
Show that command history still exists after clearing.
Practical Notes
- Ctrl+L clears the screen in many shells using Readline.
cleardoes not remove files, logs, or shell history.- If the terminal is corrupted by binary output, try
reset.