How to Clear the Windows Command Prompt Screen
Last Updated :
12 Apr, 2025
If you've been working in the Windows Command Prompt and your screen is cluttered with text, knowing how to clear the Windows Command Prompt screen can make your workspace much tidier and easier to manage. This simple task can help you focus on the commands you're working on without distraction.
In this guide, we'll show you different methods to clear the screen in CMD using various techniques, making your work in the Windows Command Prompt more efficient.
Methods to Clear Command Prompt Screen
In the below section, we are going to discuss different approaches to clearing the command prompt (CMD) screen. So keep reading the section and find the best method.
Method 1: Clear CMD Screen Using the cls command
The easiest way to clear the Command Prompt screen is by using the "cls" command in the following manner.
- Press "Win + R". It will open the "Run" dialogue box.
- Type "cmd" and press Enter to open the Command Prompt.
- Type "cls" and press Enter. This command will instantly clear the screen, giving you a clear workspace. It's a quick and effective method.
Note: Windows PowerShell can also be used instead of cmd as well.
Example: We are downloading the Python library using cmd and then will clear the screen.
Clear CMD Screen Using the cls commandOutput:

Method 2: Clear the Command Prompt Screen using the Shortcut Key
Some systems allow keyboard shortcuts for clearing the Command Prompt screen. By pressing "Ctrl+L", we can clear our screen. This shortcut is a time-saver.
Example:

Method 3: Use Closing and Reopening to Clear Command Prompt
While this approach is not very efficient as compared to the other two, it can be used in cases when other methods are not available or during system default or error. All one can do is close the current cmd screen and reopen it to get a clear screen.
Example:

Method 4: Clear the Command Prompt (CMD) Screen Using Reboot
To clear the Command Prompt (CMD) screen using a system reboot, you can't directly do it because rebooting the system closes all running programs, including the Command Prompt window. It's like turning off your computer and turning it back on, which resets everything. Make sure you have saved all your ongoing work before this. Here's a step-by-step guide on how you might approach this:
- Open Command Prompt.
- Type `shutdown /r /t 0` and press Enter.
- Confirm the restart if prompted.
- Wait for the system to reboot. Upon restart, the Command Prompt screen will be cleared.
Example:
How to View Command Prompt Command History?
Additionally, you can also view your command prompt history using the F7 shortcut key. All the previously used commands can be found by pressing the "F7" key. Pressing it will give a list of recently used commands, making it easier to reuse them in your current session.
How to Save Command Prompt History?
Also, you can save the command history in the form of a text file in cmd in the following manner:
- Open the Command Prompt.
- Type the command: "doskey /history > history.txt" and press Enter. This will export your command history to a file named "history.txt."
- Search for this file in your system and you may find all your cmd history commands there.
Example:

Output: The txt file will look like this.
To save Command Prompt HistoryOther Shortcut keys for the Command Prompt Screen
- Ctrl + C: Stop the currently running process and move the cursor to a new blank line
- F7: To View Command Prompt Command History
- Ctrl +Backspace: To remove one word to the left of the cursor
- ESC: To clear current input command text.
To sum up, it's very important to keep our cmd screen clean and organized as it makes the system more efficient and also provides ease of use for users, thus, we should know about all these methods. As mentioned, we can use any method given above according to our convenience and need.
Conclusion
Clearing the Command Prompt screen is a straightforward process that can significantly improve your workflow by providing a clean slate for new commands. Whether you prefer using a quick shortcut or typing out a command, the methods outlined in this guide will help you efficiently clear the CMD screen whenever needed. With these tips, you can keep your Command Prompt environment organized and easy to navigate.
Similar Reads
How to Use Command Prompt - Windows Command Prompt Guide
Learn how to manually run the Command Prompt in different versions of Windows - The Windows Command Prompt (CMD) is a powerful tool that allows users to execute commands, automate tasks, and troubleshoot system issues efficiently. Whether youâre a beginner looking to learn basic CMD commands or an a
5 min read
How to Clear The Screen on Putty
PuTTY is a free and open-source terminal emulator. It is used to connect to remote hosts and devices using various network protocols (SSH and Telnet are the most common ones). PuTTY is mainly used by system administrators and IT professionals for quick remote access to servers. Its lightweight desig
3 min read
How to Open the Command Prompt as Administrator in Windows
The Command Prompt is a powerful tool in Windows that lets you run commands to manage files, troubleshoot problems, and control system settings. But some commands require administrator access to work properly. Opening the Command Prompt as an administratorâoften called âelevated modeâ gives you full
6 min read
How to Take Screenshot on Windows
Different ways to take Screenshot on Windows using KeyboardUse Print screen key to take a minimized or full-screen capture screenshotUse the game bar to take a screenshot on WindowsAlt + Prt Sc (print screen button) screen captureWindows + Print Screen screen captureUse the Snipping Tool to take a s
9 min read
How to Open Command Prompt in Windows 11, 10, 8, 7
The Command Prompt is a powerful tool in Windows for executing commands, troubleshooting issues, and automating tasks. Whether you're using Windows 11, 10, 8, or 7, this guide covers all the methods to open Command Prompt quickly and efficiently.Methods to Open Command Prompt in Windows in Any Versi
8 min read
How to Repair Windows 10 Using Command Prompt - 5 Methods
Is your Windows 10 not working right? Maybe itâs slow, keeps crashing, or wonât start properly. These problems can be annoying, but you donât have to do something big like reinstalling Windows yet. Thereâs a handy tool called Command Prompt that can fix many Windows issues, and itâs already on your
6 min read
How to Remotely Start Windows through CMD?
Command Prompt (CMD) is a powerful tool not only for troubleshooting Windows errors but also for remotely managing systems. In this guide, we'll focus on using CMD to remotely start a Windows computer. Whether you're troubleshooting a system that's out of reach or simply want to save time by startin
4 min read
How to Hide the Console Window of a C Program?
The task is to hide the console window of a C program. The program for the same is given below. Note: The results of the following program can only be seen when it is executed on a console. C // C program to hide the console window #include <stdio.h> #include <windows.h> int main() { HW
2 min read
How to Reset Windows Admin Password?
If you forgot your Windows administrator password, you might be locked out of your computer and unable to access your files and settings. However, there are some ways to reset your password without losing your data or reinstalling Windows. In this article, we will show you how to reset your Windows
5 min read
How to Go Full Screen in Windows 11?
Going into full-screen mode in Windows 11 can be quite handy, whether you're working on document editing, browsing the internet, or enjoying multimedia. To enable the full-screen mode, you can use a keyboard shortcut or adjust the settings within the app itself. Enabling this feature helps you stay
5 min read