Forrest logo
tool overview
On this page you find all important commands for the CLI tool clear. If the command you are looking for is missing please ask our AI.

clear

The "clear" command is a command line tool used to clear the terminal screen or console window. When executed, it removes all previous commands and output from the screen, leaving it empty and ready for new input. It provides a clean workspace by erasing the scrolling history, making the prompt appear as if it's a fresh start. This command is handy when the terminal output becomes cluttered or if the user wants to start with a blank slate. It is commonly available on UNIX-based systems, including Linux and macOS.

List of commands for clear:

  • clear:tldr:01bc6 clear: Clear the screen (equivalent to pressing Control-L in Bash shell).
    $ clear
    try on your machine
    explain this command
  • clear:tldr:5056c clear: Clear the screen but keep the terminal's scrollback buffer.
    $ clear -x
    try on your machine
    explain this command
  • clear:tldr:65f4b clear: Indicate the type of terminal to clean (defaults to the value of the environment variable `TERM`).
    $ clear -T ${type_of_terminal}
    try on your machine
    explain this command
  • clear:tldr:74ed4 clear: Show the version of `ncurses` used by `clear`.
    $ clear -V
    try on your machine
    explain this command
tool overview