How to Clear CMD on Windows 11: Everything You Need to Know

This can be done with a single command

Reading time icon 2 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

how to clear cmd

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

  1. Open Command Prompt by pressing Windows + R, typing cmd, and hitting Enter.
    run cmd
  2. Once in the Command Prompt, type cls and press Enter.
     cls cmd
  3. The screen will now clear.
    clear cmd window

2. Use AutoHotkey

  1. Install AutoHotkey from the official website.
  2. Create a new AutoHotkey script file (.ahk).
  3. Add the following lines to the script:
    #IfWinActive ahk_class ConsoleWindowClass
    ^l::SendInput cls{Enter}
    #IfWinActive
  4. Run the script.
  5. 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.

More about the topics: command prompt, Windows 11 guides