In Unix, Operation System, You will run multiple commands in terminal, and you want to clear the previous run commands on the terminal.
clear commands works in following operating systems
- Linux flavours
- Bash shell
Clear command clear the content on terminal in Linux and Unix.
This command not accepts any arguments
Here is an syntax
This clears the current screen commands and output and show a new prompt
Shortcut command to clear the command line in terminal windows.
There are multiple short cuts 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 same prompt screen.
In Bash Shell, You can use Ctrl+L command used to clear the screen.
How to clear command line in windows
cls command in windows used to clear the current screen terminal.
Here is an syntax and example
It has no command line options