Miscellaneous
clear
Clear the terminal screen.
Synopsis
syntax
clear [OPTION]...
Examples
Clear the terminal screen
clear
Clear screen but keep scrollback history
clear -x
Alternative: reset terminal via escape sequence
printf '\033c'
Common options
| Flag | Description |
|---|---|
| -x | Don't clear scrollback buffer |
About clear
The `clear` command clear the terminal screen. Utility commands cover a broad range of everyday tasks from date manipulation and arithmetic to terminal control and system documentation.
These tools fill in the gaps between major categories and are frequently used in shell scripts, cron jobs, and interactive sessions. The command accepts 1 commonly used flag shown above, though the full set of options is available in the man page (`man clear`).
The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Miscellaneous Commands
Other commands in the Miscellaneous category