In Unix, Operation System, You will run multiple commands in the terminal, and you want to clear the previous run commands on the terminal.
clear commands work in the following operating systems
- Linux flavors
- Bash shell
Clear command clears the content on a terminal in Linux and Unix.
This command does not accept any arguments.
Here is a syntax
It clears the current screen commands and output and shows a new prompt
Shortcut command to clear the command line in terminal windows
There are multiple shortcuts to clear command lines.
ctrl + U - clear the terminal screen and displays a new terminal
How to cancel the current command?
ctrl + C command cancels the current command without running and displays the same prompt screen.
In Bash Shell, You can use the Ctrl+L command used to clear the screen.
How to clear command line in windows
CLS command in windows is used to clear the current screen terminal.
Here is a syntax and example
It has no command-line options.