How to Clear CMD on Windows 11: Everything You Need to Know
This can be done with a single command
2 min. read
Published on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Ever found yourself staring at a cluttered Command Prompt screen and wished you could clear it up quickly? You’re not alone. Let’s dive into some straightforward methods to clear the CMD screen and make your command line experience smoother.
How do I clear in CMD?
1. Use the CLS Command
- Open Command Prompt by pressing Windows + R, typing cmd, and hitting Enter.
- Once in the Command Prompt, type cls and press Enter.
- The screen will now clear.
2. Use AutoHotkey
- Install AutoHotkey from the official website.
- Create a new AutoHotkey script file (.ahk).
- Add the following lines to the script:
#IfWinActive ahk_class ConsoleWindowClass
^l::SendInput cls{Enter}
#IfWinActive - Run the script.
- Now, pressing Ctrl + L will send the cls command to the Command Prompt, clearing the screen.
There is no built-in keyboard shortcut to clear the Command Prompt screen directly in Windows. However, you can use an AutoHotkey script to achieve this.
How to clear command history in CMD?
To do this, simply close Command Prompt. If that’s not an option, you can use the Alt + F7 shortcut.
As you can see, it’s pretty simple to clear CMD in Windows, and you can do it natively with a single command.
To learn more about the command line, we have a great guide on how to open a folder in Command Prompt, as well as an article that compares Command Prompt and Windows Terminal.
We also have another guide that explains how to change the default terminal in Windows 11, so don’t miss it.
User forum
0 messages