How to Clear the Screen in Windows Command Prompt (CMD)
Clearing the Command Prompt (CMD) screen can help improve readability and remove clutter from previous commands. Follow these steps to clear the screen in Windows CMD.
Method 1: Using the CLS Command (Recommended)
The easiest way to clear the CMD screen is by using the cls
command.
Steps:
- Open the Command Prompt:
- Press
Win + R
, typecmd
, and press Enter.
- Press
- Type the following command:
cls
- Press Enter. The screen will be cleared.
Method 2: Close and Reopen CMD
If the cls
command does not work or if you prefer a fresh session:
Steps:
- Close the Command Prompt window by clicking the X button or typing:
exit
and pressing Enter. - Reopen Command Prompt by searching for
cmd
in the Start Menu or usingWin + R
>cmd
> Enter.
Method 3: Use Keyboard Shortcut in Windows Terminal
If you’re using Windows Terminal, you can use a shortcut to clear the screen.
Steps:
- Open Windows Terminal.
- Press
Ctrl + Shift + P
to open the command palette. - Type “Clear Buffer” and select it, or simply use:
cls
in the terminal window and press Enter.
Conclusion
The cls
command is the quickest and easiest way to clear the CMD screen, but if you prefer, closing and reopening CMD also works. In Windows Terminal, additional shortcuts can be used for clearing output efficiently.