How to Clear Screen on Command Prompt in Windows 10

You may know Command Prompt (CMD) if you’re a Windows user. However, if you’re someone who are writting commands on Command Prompt screen then you definetely want to know how to clear the Command Prompt screen. So, in this guide, you will learn 3 ways to clear screen on Command Prompt in Windows 10.

What is Command Prompt?

A command prompt is a text-based user interface screen for an operating system or software that contains an input field. In this sense, a prompt is anything that is intended to trigger an action. The command prompt consists of a short text phrase followed by a flashing cursor where the user enters instructions.

From the early days of computing until the 1980s, command line interfaces (CLI) and prompts were the usual interfaces. CLI was used in MS-DOS systems and other early consumer market computers. For administrative activities, current Windows systems have the CLI. The command line interface (CLI) is still an important aspect of using Linux.

The command prompt is an executable CLI software called cmd.exe. At the command prompt, the user inputs a statement that includes a basic batch file or command name as well as any parameters to describe the program’s execution circumstances, logging, and so on.

Command prompt interfaces may be powerful and concise, and they can provide access to capabilities that are not available through the GUI. They also provide improved automation through scripting, although there may be a high learning curve to grasp command expertise.

How to Clear Screen on Command Prompt in Windows 10

Check the easy ways below for how to clear screen on Command Prompt in 3 ways:

Method 1. Clear CMD Screen using Shortcut Key (Esc)

The first and easy method to clear screen on Command Prompt in Windows 10 is using the “Esc” key which is located at the top left-hand corner. Remember that this will only clear the command which isn’t entered.

Write any command on the CMD Screen. For the purpose of this guide, we’ll use “hostname.”

How to Clear Screen on Command Prompt in Windows 10 in 2021

Now, press the “Esc” key to clear the command in the CMD screen.

How to Clear Screen on Command Prompt in Windows 10 in 2021
Press the Esc Key

Method 2. Use the Cls Command to Clear the Whole Command Prompt Screen

After running Command Prompt on Windows 10 and inputting a few command lines on the keyboard, type “CLS” in the Command Prompt window and hit Enter. It will clear screen on Command Prompt screen from Windows 10. All previous commands entered into the Command Prompt window are deleted.

The CLS command removes everything from the Command Prompt screen, leaving you with a clean screen.

How to Clear Screen on Command Prompt in Windows 10 in 2021

Method 3. Close & Reopen CMD

You may also close and reopen the Command Prompt window, which will clear the Command Prompt screen on Windows 10. Meanwhile, type exit or press Alt + F4 to quit and reopen the command prompt box on Windows 10.

How to Check Command Prompt Command History

Almost every user uses Command Prompt to perform numerous tasks. Some instructions are often used and repeated for various purposes. If you forget which command you just ran because you need to repeat it again. Do not be concerned since you can simply examine command prompt history by going to the history of the Command Prompt window.

If you’re someone who wants to view the Command Prompt screen then type doskey /history¬†command line and press¬†enter. This command displays all of the commands you wrote in the same order as you entered them.

doskey /history
Saving Command Prompt History

You can only check the command history as long as your CMD window is open. When you close it, all orders are erased, leaving no trace of their existence. What if you require the same commands for the next time you use the CMD window, but you don’t remember which ones you used before?

Before exiting the window, you may save your instructions list as a TXT, HTML, CSV, or RTF file to keep a backup of your inputted commands.In your Command Prompt window, enter the following command:

doskey /HISTORY > history.txt
doskey /HISTORY > history.txt

Now, navigate tto C drive > Users > here, you will see a file by the name of history.txt.

View Command Prompt Saved History

So, this post was all about how to clear screen on Command Prompt in Windows 10 and we showed you 3 different ways. In the meantime, you;ve also learned how to view Command Prompt history and also how to save the Command Prompt history.

Read More:

Where is Clipboard in Windows 10

21 Best Command Prompt Tricks

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.