Windows Command Prompt Gems

Below are some of the must know keyboard shortcuts when working with commands in Windows Command Prompt.

Ctrl End Erase content to the left of the cursor

echo Sample    Text echo Sample

Ctrl Home
Erase content to the right of the cursor

echo Sample    Text Text

F7 Show previous command history


F8 Cycles through previous commands starting with the currently typed characters. Assume we have previously typed below commands

  1. dir
  2. notepad a.txt
  3. dir c:\
  4. dir c:\Windows

Now if I type di and hit F8 then command prompt will cycle through all previous commands starting with di

This is equivalent to Ctrl+r in bash terminal

Note: Windows 10 Command Prompt has much better keyboard shortcuts support.

Leave a comment

Leave a Reply