How to Clear Command Prompt Screen on Windows

Here are three methods on how to clear the Windows Command Prompt screen.

Working on Command Prompt in Windows requires you to clear the screen frequently. It could be you are doing a long task, and the crowded screen is distracting you. You might also want to clear the screen if you have entered sensitive information in the Command Prompt. That’s why you should know how to clear Command Prompt without letting it affect your work.

Depending on your situation, there are many ways to clear the Command Prompt. You can learn different ways to clear the CMD screen by reading this article till the end.

Method 1: Use CLS Command to Clear Command Prompt Screen

One of the simplest and most common ways to clear the screen in CMD is to use the clear or “cls” command. This command can clear your Command Prompt screen without clearing the history. You can access the previous history through the upward arrow key even after using this command. Use these steps to clear Command Prompt by using the clear command:

Step 1: Launch the Command Prompt to Perform Functions

Open the Command Prompt on your system using the search bar and run it as an Administrator or normal. Once it is open, you can do your required tasks.

Step 2: Use the cls Command in CMD

When you are done with your work, run the “cls” command. It will clear the Command Prompt screen, and you can start your next task.

Pro Tip 1: The clear command also works if you use Windows PowerShell instead of Command Prompt. You can run the “cls” or “clear” command to clear the screen in Windows PowerShell.

Pro Tip 2: Creating an alias for the “cls” command is possible by creating a BAT file. You can later use this alias to run the “cls” command. To create a BAT file, open Notepad on your computer and write the “echo cls > C:\Windows\Clear.bat” line. Now save the file as Clear.bat and move it to the Windows directory in C. Use the “ doskey cls=C:\Windows\Clear.bat” command in the CMD to set up the alias.

Method 2: Use Keyboard Shortcuts to Clear Command Prompt Screen

Keyboard shortcuts in Windows are beneficial when working on any task. They allow you to speed up your work and increase your productivity. If you want to find keyboard shortcuts to clear the Command Prompt screen, you will be disappointed as there are none. Below are a few keyboard shortcuts keys that can help remove unnecessary inputs in CMD:

  • Esc: The Escape or Esc key can be used to delete the current line of text in Command Prompt. It completely removes the line and moves the cursor back to the prompt.
  • Backspace: You can use the Backspace key to delete the one character to the left side of the cursor on CMD. Pressing and holding the Backspace key will result in the continuous deletion of text one character at a time.
  • Ctrl + Home: When typing a command, it can delete everything on the left side of the cursor in CMD.
  • Ctrl + End: This key is used to delete all the text to the right side of the cursor when using Command Prompt.
  • Ctrl + Backspace: Using this combination will allow you to delete a single word on the left side of the cursor. By holding the “Ctrl + Backspace” key, you can delete the whole text line one word at a time.
  • Ctrl + C: With the help of this CMD shortcut, you can move your cursor to the new blank line, but this will terminate your running process or command.

Method 3: Close and Reopen Command Prompt to Clear the Screen

Closing the Command Prompt and reopening it will also clear the CMD screen. It is helpful if you need to clear the screen to do a new task. The simple process to use this method to clear the CMD screen is following:

Step 1: Close the Command Prompt to Clear the Screen

Once you have done your task in the Command Prompt and need to clear the screen, press the “X” icon from the top right corner to close CMD. When you reopen the Command Prompt, the screen will be cleared.

Step 2: Open the Command Prompt on your Device

Run the Command Prompt by searching for it in the search bar. It is also possible to use the Run function to open Command Prompt. Use the “Win + R” key to open the Run function and type “cmd.” If you want to run it as Admin, then press “Ctrl + Shift + Enter.”

Bonus #1: Clear Command Prompt Screen without Erasing Everything

Want to know how to clear the CMD screen without erasing everything? There is a way. Using this method, you can clear the distracting clutter of commands without removing them. If you need to view them again, you simply need to scroll upward. You perform this bonus tip by following these instructions:

Step 1: Scroll Down through Command Prompt

After you have opened Command Prompt and started work, you can use the “Ctrl + Down Key ↓” to move below the screen. Continue to do that until your current command line is only visible on screen.

Step 2: Access the Previous Command by Scrolling Upward

You can scroll upward using the mouse to access the previous command. Use the “Ctrl + Up Key ↑” on a laptop to scroll upwards.

Bonus #2: Clear Screen on Windows Subsystem for Linux

You might have used the Terminal if you use any Linux system like Ubuntu on Windows through Virtual or subsystem. Most Linux users use the Terminal to do different tasks. In Linux, you can use the “clear” command to clear the terminal screen and remove all previous commands and output. This can be useful if the terminal window is cluttered or you want to start a new session with a clean screen.

To use the clear command, open a terminal window and type “clear” followed by the “Enter” key. This will clear the terminal screen and leave your previous commands intact, allowing you to scroll up and view them.

Conclusion

As we know, Command Prompt is a powerful feature of Windows that allows users to perform a wide range of tasks on their computers. It is also often used to run batch files and perform advanced tasks that are impossible otherwise. With this feature, you can troubleshoot and diagnose problems with the operating system and other software. Thus, knowing how to clear the Command Prompt screen properly is extremely important.

Avatar photo
Abdullah Habib

Abdullah is a tech enthusiast and a geek gadgets fan. He majored in Electrical and Electronics Engineering and got a bachelor's degree in science.

Leave a Reply

Your email address will not be published. Required fields are marked *