Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way of clearing the command prompt screen in windows using keyboard shortcuts?

share|improve this question
If keyboard shortcuts are a must for some reason you can always cook up an AutoHotkey script that sends cls<Enter> to the open command prompt window. – Karan Apr 20 '13 at 13:03

NO, But you can use CLS command to clear the whole screen, Esc (Escape) key will clear the input line. In addition, pressing Ctrl + C will move the cursor to a new blank line.

share|improve this answer
in powershell you can use also clear – binary_runner Dec 9 '14 at 12:23
I think I understand why people like to alias clear in linux to cls for the consistency between systems! – Roy Ling Nov 4 '15 at 5:40
helped me.. thanks...!! – Mr. Noddy May 11 at 9:05

If you really really want to do that with a keyboard shortcut (myself included) you might turn to using autohotkey and write a little script like this:

; -------------------------------------------------------------------------
; Cntr-L should clear screen
; -------------------------------------------------------------------------
#IfWinActive ahk_class ConsoleWindowClass
Send cls{Enter}


what the script does ...

  • first look if one is within console application
  • if CTRL+L is pressed
  • write cls to the console and then hit ENTER
share|improve this answer
+1, elegant solution. I will use this. Thank you. – xIcarus Oct 11 '15 at 20:32
You might want to use SendInput – user2418306 Feb 19 at 11:57
Also #IfWinActive Command Prompt will prevent overriding shortcuts for other console applications like bash – user2418306 Feb 19 at 12:11
must say, this makes me smile every time I use it. TY @petermeissner – digger69 Apr 22 at 15:58

I would like to clear out something from mehdi's answer (I do not have enough reputation to add a comment to his post).

Ctrl + C actually aborts the current task that the shell is doing. For example, if you're trying to connect to an ftp server that does not exist, you can abort using Ctrl + C before the timeout occurs.

Ctrl + C moves the cursor to a new line only if the shell is not doing anything, eg. launch the command prompt and press Ctrl + C.

But like he said, there's no shortcut to clear the screen, like bash's Ctrl + L. cls is used for clearing the screen, while Alt + F7 clears the command history.

share|improve this answer
+1 for mentioning cls although it is not a keyboard shortcut as such – petermeissner Aug 13 '15 at 11:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .