Command prompt hotkeys in Windows 10

The command prompt in Windows 10 is the shell environment where you can run text-based console tools and utilities by typing commands. Its UI is very simple and does not have any buttons or graphical commands. But it provides a set of useful hotkeys. Today, I would like to share this list of command prompt hotkeys available in Windows 10.

Windows 10 has default text editing shortcuts enabled in the command prompt window. They are as follows:

CTRL + A - Select all
CTRL + C - Copy
CTRL + F - Find
CTRL + M - Mark
CTRL + V - Paste
CTRL + / CTRL + - Scroll line up or down
CTRL + PgUp / CTRL + PgDn - Scroll whole page up or down

Up arrow key or F5 - returns to the previous command. The command prompt stores a history of the commands you type in one session until you exit it. Every time you press the Up arrow key or F5, the command prompt will cycle through the previously entered commands one-by-one in the reverse order of input.

Down arrow key - scrolls the command history in the order in which they were entered in one session, meaning, the down arrow key's order of cycling through commands is opposite to the Up arrow key.

The Up and Down arrow keys store the position in the command history until you execute a new command. After that, the newly executed command will be added to the end of the command history and its position will be lost.

F7 - shows your command history as a list. You can navigate this list by using Up/Down arrow keys and press Enter to execute the selected command again:

ESC - clears the entered text.

Tab - auto-completes the file name or directory/folder name. For example, if you type c:\prog in the command prompt window and then press the Tab key, it will be replaced with "c:\Program Files". Similarly, if you are at C:\ and you type, CD C:\Win and press the Tab key, it will be auto complete C:\Windows for you, This is a very useful key and can be customized from the Registry. You can even set separate keys for filename completion and directory completion.

F1 - Displays previously typed command(s) one character at a time. Press the Up arrow to display some previously entered command and press Escape to clear the command line. Now press F1 multiple times: every time you press F1, one character from the command will appear on the screen.

F2 - repeats the previous command in history from the beginning up to the specified character. For example, I have dir c: in my history. I can locate it in the history using the Up arrow.
Then if I press Esc to clear the input and press F2, it will ask me for char to copy up to:


To copy only the portion of the command up to "dir", enter space bar (space) as the character to copy up to.

F3 - repeats the previously typed command. It acts like the Up arrow key, but repeats only one command.

F4 - Deletes the text to the right of the cursor position up to the specified character
In the example above, the cursor is located at "e" char, so when I specify "o", it will delete the characters "ech":

Alt+F7 - clears the command history. All your input history will be erased.

F8 - moves backwards through the command history, but only display commands which begin at the specified character. You can use this option to filter your history. For example, if you type cd at the input line and then press F8, it will cycle through only those commands in your history which begins with "cd".

F9 allows you to run a specific command from the command history. It requires you to enter the command number, which you can get from the history list (F7):


Press F9 and 1 to run "ver" command:

Ctrl + Home - deletes all the text to the left of the current input position.

Ctrl + End - deletes all the text to the right of the current input position.

Ctrl + Left arrow - moves your cursor to the first character of each word towards the left.

Ctrl + Right arrow - moves your cursor to the first character of each word towards the right.

Ctrl + C - aborts currently running command or batch file.

Enter - Copies the selected/marked text. You can mark text by single clicking the Command prompt icon in the title bar and then choosing Edit -> Mark. After clicking Mark, you must select text by drag and drop using the mouse or by using Shift+Left/Right arrow keys. If Quick Edit Mode is turned on from Properties, then you only need to directly drag and drop, there is no need to go to Edit -> Mark.

Insert - Toggles between insert mode and overwrite mode at the current cursor position. In overwrite mode, the text you type will replace any text following it.

Home - Moves to the beginning of the command

End - Moves to the end of the command

Alt+Space - shows the window menu of the Command Prompt. This menu contains very useful functions under the Edit submenu besides Defaults and Properties. Regular window shortcuts also work, so you can press Alt+Space and then C to close the command prompt window instead of typing Exit.

That's it. If you know more hotkeys, you're welcome to comment.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

9 thoughts on “Command prompt hotkeys in Windows 10”

  1. Good lord… My life has been a lie! Didn’t know not even the half of them. Thanks a bunch!!! F7 it’s going to be very useful!!!

  2. I have been using cmder (http://cmder.net/), a Portable console emulator for Windows, for long time. Now, after knowing shortcuts you mentioned, I will visit command prompt more often.

    Thanks for sharing something this trivial. It can be inspiring.

  3. Thanks Sergey,
    I know that cmdr developer even recommend on using ComEmu. But I have been lazy to tinker around and explore the differences between two. I know ComEmu is more actively developed and a better choice over CMDER as developer has put in his own words.

    If you have trouble with anything I am happy to help. But you will have much better chances to find solutions on the pages of the upstream projects. Those are:
    Console emulator ~ Conemu
    Cmd.exe enhancements ~ clink
    Unix tools on windows ~ git for windows

    I like to see your set up these utilities and your way with them.

    Now when bash is in Winodws, I will be using it more often along.

    Thanks for reply.

    I have one more question to ask from you. Please tell me the name of artists of background music you use in your youtube video. I absolutely love them.

    1. Those are tracks from the standard YouTube library. It offers them for free for every user.
      Tracks are as follows:

      Backpacking
      Days Are Long
      First of the Last
      Hear the Noise
      New Land
      Present Standard

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.