A practical reference for Windows 10 and Windows 11 users: edit commands faster, reuse command history, copy and paste text, select output, autocomplete paths, and control CMD inside Windows Terminal.
Command Prompt keyboard shortcuts, also called CMD hotkeys, are key combinations that help you work faster in cmd.exe. They can move the cursor, edit the current command, open command history, repeat previous commands, copy output, paste paths, select text, and interrupt a running command without using the mouse.
Most of these shortcuts work in both Windows 10 and Windows 11. Some behavior depends on where CMD is running: the classic Console Host window, Windows Terminal, a remote session, or recovery mode.
Use cursor, word movement, delete, and history shortcuts instead of retyping long commands.
Paste paths, copy command output, and avoid mistakes caused by manual typing.
Scroll through long results, search the screen buffer, and select text from previous output.
If you only want the most useful Windows CMD keyboard shortcuts, start with the table below. These hotkeys cover the actions most people repeat every day in Command Prompt.
| Shortcut | Action | When to Use It |
|---|---|---|
| Tab | Autocomplete a file or folder name | When typing long paths or executable names |
| โ / โ | Move through command history | When you need to run or edit a previous command |
| F7 | Show a command history window | When you want to pick a command from a visible list |
| F3 | Repeat the last command | When you accidentally cleared the line or need the previous command again |
| Esc | Clear the current command line | When the current command is wrong and you want to start over |
| Ctrl + C | Stop a running command, or copy selected text | When a command hangs, or when text is selected in the console |
| Ctrl + V | Paste text into CMD | When inserting a copied command, path, or argument |
| Ctrl + F | Find text in the console buffer | When long command output contains many lines |
These shortcuts help you edit the current command before pressing Enter. They are especially useful when working with long paths, network commands, DISM commands, or repeated troubleshooting commands.
| Shortcut | What It Does | Example Use |
|---|---|---|
| โ / โ | Move the cursor one character left or right | Fix a typo without deleting the whole command |
| Ctrl + โ / Ctrl + โ | Move the cursor one word at a time | Jump between command arguments quickly |
| Home | Move to the beginning of the current command | Add echo, start, or another prefix |
| End | Move to the end of the current command | Continue typing after editing the beginning |
| Backspace | Delete the character before the cursor | Remove a mistyped letter or slash |
| Delete | Delete the character after the cursor | Remove an extra symbol without moving the cursor |
| Ctrl + Home | Delete text from the cursor to the beginning of the line | Keep the ending of a long command but replace the beginning |
| Ctrl + End | Delete text from the cursor to the end of the line | Keep the beginning of a command and replace the arguments |
| Insert | Toggle insert mode and overwrite mode | Control whether new characters push text forward or replace it |
| Esc | Clear the current line | Start a fresh command without pressing Backspace many times |
Suppose you typed this command and noticed that the folder name is wrong:
cd C:\Users\Public\Dowloads
Dowloads to Downloads.Command Prompt keeps a history of commands entered in the current CMD session. You can reuse previous commands, search through them, or open a visible history list.
| Shortcut | Action | Notes |
|---|---|---|
| โ | Show the previous command | Press repeatedly to go further back |
| โ | Show the next command in history | Useful after pressing โ too many times |
| F7 | Open the command history list | Use arrow keys and Enter to select a command |
| Alt + F7 | Clear command history for the current session | This does not clear commands from other CMD windows |
| F8 | Search history using the text already typed | Type the beginning of a command, then press F8 |
| F9 | Run a command by its history number | Use F7 first if you need to see the numbers |
| Page Up | Recall the oldest command in the current history buffer | Useful in long troubleshooting sessions |
| Page Down | Recall the newest command in the current history buffer | Returns you near the latest typed command |
Many useful Command Prompt shortcuts are hidden behind function keys. They are not as well known as Ctrl + C or Ctrl + V, but they can save time when repeating commands.
| Key | CMD Function | Best For |
|---|---|---|
| F1 | Paste the previous command one character at a time | Rebuilding a command slowly from the previous entry |
| F2 | Paste the previous command up to a character you specify | Copying only the beginning of the last command |
| F3 | Paste the previous command | Repeating the last command quickly |
| F4 | Delete text up to a character you specify | Removing a section of the current command |
| F5 | Move backward through command history | Cycling through old commands without using the arrow key |
| F7 | Show the history list | Choosing from several earlier commands |
| F8 | Search command history by prefix | Finding a previous command that starts with the text you typed |
| F9 | Ask for a history number and insert that command | Running a command from the F7 list by number |
Copying and pasting in Command Prompt is safer than retyping commands manually. It reduces mistakes in long paths, registry commands, network commands, and repair commands.
| Shortcut | Action | Details |
|---|---|---|
| Ctrl + V | Paste clipboard text | Works in modern CMD windows when Ctrl shortcuts are enabled |
| Shift + Insert | Paste clipboard text | Useful if Ctrl + V is unavailable |
| Ctrl + C | Copy selected text, or stop a command | Copies only when text is selected; otherwise it may interrupt the running process |
| Ctrl + Insert | Copy selected text | Alternative copy shortcut for console windows |
| Ctrl + A | Select text depending on cursor context | May select the current line first, then the console buffer when pressed again |
| Ctrl + M | Enter Mark mode | Allows keyboard-based text selection in the console window |
| Shift + Arrow Keys | Extend the text selection | Works after entering selection or Mark mode |
| Enter | Copy selected text in Mark mode | Useful when selecting text with the keyboard instead of the mouse |
Before pasting commands from a web page, paste them into Notepad first and inspect them. This is especially important for commands that use del, format, diskpart, bcdedit, reg, or administrator privileges.
The Tab key is one of the most useful Command Prompt shortcuts. It completes file names, folder names, and executable names in the current context.
Instead of typing a long folder name manually, type only the beginning and let CMD complete it:
cd C:\Users\Public\Doc
Then press Tab. Command Prompt may complete it to:
cd C:\Users\Public\Documents
In Windows 11, Command Prompt may open inside Windows Terminal. In that case, some shortcuts control the terminal window rather than CMD itself. These are useful when running multiple Command Prompt tabs.
| Shortcut | Windows Terminal Action | Use Case |
|---|---|---|
| Ctrl + Shift + T | Open a new tab | Start another shell session without closing the current one |
| Ctrl + Shift + W | Close the current tab or pane | Close a finished CMD session |
| Ctrl + Tab | Switch to the next tab | Move between Command Prompt, PowerShell, and WSL tabs |
| Ctrl + Shift + Tab | Switch to the previous tab | Return to an earlier session quickly |
| Ctrl + Shift + F | Search terminal text | Find output across the visible terminal buffer |
| Ctrl + + / Ctrl + - | Increase or decrease font size | Make CMD output easier to read |
If Ctrl + C, Ctrl + V, or selection shortcuts do not work in Command Prompt, check the console settings. This usually applies to older Windows installations, customized console profiles, or systems where legacy console mode is enabled.
Run a command once:
ping 8.8.8.8
Then press โ to bring it back, press Ctrl + โ to jump to the IP address, edit it, and run another test:
ping 1.1.1.1
After running several commands, press F7 to display the command history. Select a previous repair command and press Enter:
sfc /scannow
DISM /Online /Cleanup-Image /RestoreHealth
Start typing a path:
cd C:\Program
Press Tab until CMD completes the folder:
cd "C:\Program Files"
If the output is too long to review comfortably with scrolling shortcuts, save it to a text file:
ipconfig /all > "%USERPROFILE%\Desktop\network-info.txt"
Then open the file in Notepad and use Ctrl + F to search it.
When CMD shortcuts fail, the cause is usually not the command itself. Check the console host, keyboard settings, remote session behavior, and whether another program is capturing the keys.
| Problem | Likely Cause | Fix |
|---|---|---|
| Ctrl + V does not paste | Ctrl shortcuts are disabled or legacy console mode is active | Open CMD Properties and enable Use Ctrl key shortcuts |
| F7 does not show history | Laptop function row is set to media keys | Try Fn + F7 or change the Fn lock setting |
| Ctrl + C stops a command instead of copying | No text is selected in the console | Select text first, then press Ctrl + C; or use Ctrl + Insert |
| Tab does not complete the expected file name | The current folder is different from what you think, or the typed prefix matches another item | Run cd to check the current directory and press Tab repeatedly |
| Shortcuts behave differently in Terminal | Windows Terminal intercepts some key combinations | Check Terminal settings or open classic Command Prompt with cmd.exe |
| Shortcuts fail in Remote Desktop or a virtual machine | The host system captures the key combination | Use the remote client keyboard settings or send the key combination through the session menu |
Open a new Command Prompt window and test the shortcut there. A stuck console process can make input behave strangely.
Fast TestConfirm that Ctrl shortcuts are enabled and that legacy console mode is not forcing older behavior.
SettingsIf classic console behavior is inconsistent, run CMD as a profile inside Windows Terminal and compare the shortcuts.
Alternativecls and press Enter.The best Command Prompt keyboard shortcuts to memorize first are Tab for autocomplete, โ and โ for command history, F7 for the history list, Esc to clear the current line, Ctrl + V to paste, and Ctrl + C to copy selected text or stop a running command.
Once those shortcuts become automatic, add the function-key shortcuts, Mark mode selection, console search, and Windows Terminal tab shortcuts to make everyday troubleshooting faster and less error-prone.