what to know
- Type cls as the new command and press Enter . This will clear the entire screen.
- Another way to erase the CMD screen is to reopen the program. Alternatively, you can enter Start to launch a new instance.
- Press the Esc key to erase the line of text you are typing. This does not affect the rest of the screen.
This article describes how to clear the screen in the Windows Command Prompt application. You can use short commands to erase the contents of the screen or reopen the program. We also have a bonus section at the end for clearing lines, characters or words.
Unlike many things on your computer, there aren't multiple ways to erase everything from Command Prompt. Instead, there is a basic command to clear the history on your screen.
When you are ready to erase everything in the command prompt to start over, type the following command and press Enter :
cls
The command must be executed by itself to work. If you see an error message stating that what you wrote was not recognized as a command, delete all text before and after CLS. Read on to learn how to do this.
The only way to clear all text from the command prompt is to close it. If for some reason you are unable to issue the CLS command, close the program by typing exit or pressing the X at the top. Then, open the command prompt again.
If you enter the command start , it will open a new instance of the command prompt without closing the first instance. This feature is useful if you want to enter some new commands on a clean screen, but don't want to lose all the progress you've made.
Maybe you don't necessarily need to clear the entire command prompt screen, but just the current line or some text within it. Here are some useful keys to remember:
- Esc : Clear the current line of text. It deletes the text and moves the cursor back to the beginning of the prompt.
- Backspace : Delete one character to the left of the cursor.
- Ctrl+Backspace : Delete a word to the left of the cursor.
- Ctrl+C : Stops the line you are typing or the command you are running and moves to a new prompt on the next line.
- Arrow keys : Move left or right within the active line to delete or edit commands.
If you're new to using the command prompt, check out our command prompt tips.
FAQEvery time you close the command prompt, your command history will be cleared. Close the window manually or use the Alt + F4 keyboard shortcut.
Use the help command: Type help to see a list of available commands. To get more information about a specific command, type help on the command name.