Windows Guide ยท 2026

Command Prompt Keyboard Shortcuts: Windows CMD Hotkeys Cheat Sheet

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.

โŠž Windows 10 โŠž Windows 11 โŒจ๏ธ CMD Hotkeys ๐Ÿ’ป Command Prompt ๐Ÿ• 8 min read

What Are Command Prompt Keyboard Shortcuts in Windows?

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.

โ„น๏ธ
Good to know In modern Windows, Ctrl shortcuts such as Ctrl + C and Ctrl + V usually work in Command Prompt. On older or customized systems, you may need to enable Use Ctrl key shortcuts in the CMD properties window.
โŒจ๏ธ

Edit Commands Faster

Use cursor, word movement, delete, and history shortcuts instead of retyping long commands.

๐Ÿ“‹

Copy and Paste Reliably

Paste paths, copy command output, and avoid mistakes caused by manual typing.

๐Ÿงญ

Navigate CMD Output

Scroll through long results, search the screen buffer, and select text from previous output.

Best Command Prompt Hotkeys to Learn First

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
โš ๏ธ
Important Ctrl + C has two meanings in Command Prompt. If text is selected, it copies the selection. If no text is selected and a console command is running, it usually sends a break signal to stop that command.

Command Line Editing Shortcuts in Windows CMD

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

Quick Editing Example

Suppose you typed this command and noticed that the folder name is wrong:

cd C:\Users\Public\Dowloads
  1. Press Ctrl + โ† until the cursor reaches the misspelled folder name.
  2. Use โ†, โ†’, Backspace, or Delete to fix Dowloads to Downloads.
  3. Press Enter to run the corrected command.

Command History Shortcuts in Command Prompt

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
๐Ÿ’ก
Tip CMD history is session-based. If you close the Command Prompt window, the visible command history for that window is gone. For a permanent record, redirect output to a text file or keep your commands in a script.

CMD Function Key Shortcuts: F1, F2, F3, F4, F5, F7, F8, and F9

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
โŒจ๏ธ
Laptop note On many laptops, function keys may require the Fn key. For example, you may need to press Fn + F7 instead of only F7 if the top row is configured for media controls.

Copy, Paste, and Text Selection Shortcuts in Command Prompt

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

Safe Paste Rule for CMD

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.

Autocomplete File and Folder Names with Tab in Command Prompt

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.

  1. Type the beginning of a command, file name, or folder path.
  2. Press Tab to complete the next matching item.
  3. Press Tab again to cycle through additional matches.
  4. Press Shift + Tab to cycle backward through matches in many console configurations.

Autocomplete Example

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
โœ…
Best practice Use Tab completion for paths with spaces. CMD usually inserts quotes when needed, which helps avoid errors such as The system cannot find the path specified.

Windows Terminal Shortcuts for Command Prompt Tabs

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

โœ“ CMD Shortcuts

  • Edit the command line
  • Use command history
  • Autocomplete file paths
  • Interrupt a running command

โœ— Terminal Shortcuts

  • Open, close, and switch tabs
  • Split panes or adjust appearance
  • Zoom the terminal text
  • Search the terminal buffer

How to Enable Ctrl Keyboard Shortcuts in Command Prompt

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.

  1. Open Command Prompt.
  2. Right-click the title bar and choose Properties.
  3. Open the Options tab.
  4. Enable Use Ctrl key shortcuts.
  5. Enable QuickEdit Mode if you want easier mouse selection.
  6. Click OK, close CMD, and open it again.
โš ๏ธ
Legacy mode If Use legacy console is enabled, some modern shortcuts may behave differently. Disable legacy console mode unless you need it for an old program.

Practical Examples: How CMD Hotkeys Save Time

Example 1 โ€” Repeat and Modify a Network Command

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

Example 2 โ€” Find a Previous DISM or SFC Command

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

Example 3 โ€” Use Tab Completion for a Folder with Spaces

Start typing a path:

cd C:\Program

Press Tab until CMD completes the folder:

cd "C:\Program Files"

Example 4 โ€” Save Long Output to a File Instead of Scrolling

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.

Why Command Prompt Keyboard Shortcuts May Not Work

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
Check 1

Test Another CMD Window

Open a new Command Prompt window and test the shortcut there. A stuck console process can make input behave strangely.

Fast Test
Check 2

Review Console Properties

Confirm that Ctrl shortcuts are enabled and that legacy console mode is not forcing older behavior.

Settings
Check 3

Try Windows Terminal

If classic console behavior is inconsistent, run CMD as a profile inside Windows Terminal and compare the shortcuts.

Alternative

Frequently Asked Questions About Command Prompt Keyboard Shortcuts

Q What is the shortcut to paste in Command Prompt?
Use Ctrl + V in modern Command Prompt. If it does not work, try Shift + Insert or enable Use Ctrl key shortcuts in CMD Properties.
Q What does Ctrl+C do in CMD?
Ctrl + C copies selected text if there is an active selection. If a command is running and no text is selected, it usually interrupts or stops the running command.
Q How do I see command history in Command Prompt?
Press F7 to open the command history list. You can also press โ†‘ and โ†“ to move through previous commands one at a time.
Q What is the CMD shortcut for autocomplete?
Press Tab. CMD will complete a matching file or folder name. Press Tab repeatedly to cycle through matches.
Q How do I clear the current command line?
Press Esc to clear the current command line before running it. To clear the screen output, type cls and press Enter.
Q Are CMD shortcuts the same in Windows Terminal?
Most CMD editing and history shortcuts still work, but Windows Terminal adds its own shortcuts for tabs, panes, font size, and search. Some key combinations may be handled by Terminal before they reach CMD.
Q Can I change Command Prompt keyboard shortcuts?
Classic Command Prompt has limited built-in shortcut customization. Windows Terminal provides more keyboard shortcut settings if you run Command Prompt as a Terminal profile.

Conclusion: The Most Useful CMD Hotkeys for Windows Users

Key Takeaway

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.

Related Windows Guides