Here are methods to clear the terminal in different operating systems:
Windows (Command Prompt)
You can use the cls command:
cls
Windows (PowerShell)
In PowerShell, you can also use the Clear-Host command or simply cls:
Clear-Host
or
cls
macOS and Linux
In macOS and Linux, you can use the clear command:
clear
Keyboard Shortcuts
- Windows:
Ctrl + L(in some terminals) - macOS/Linux:
Ctrl + L
Resetting the Terminal
If the terminal display is corrupted, you can use the reset command in macOS and Linux:
reset
These commands and shortcuts will help you clear the terminal screen across different operating systems.
