Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Command Prompt Keyboard Shortcuts for Windows 10 and 11

Edit commands, reuse history, complete paths, copy output, search the console buffer, and stop running tasks with current Command Prompt shortcuts.

Table of Contents

Command Prompt keyboard shortcuts help you edit long commands, reuse history, complete paths, copy output, search the scrollback buffer, and stop a running command. The exact selection and scrolling behavior can differ between the legacy Windows Console Host and a Command Prompt tab inside Windows Terminal, but the core CMD editing shortcuts remain useful on Windows 10 and Windows 11.

Using Command Prompt shortcuts on Windows 10 Picture 1

Command editing and history

ShortcutAction
Left/Right arrowMove the cursor one character
Ctrl+Left/Right arrowMove by words
HomeMove to the start of the current command line
EndMove to the end of the current command line
Up/Down arrowRecall earlier or later commands from history
Page Up/Page DownMove to the first or last command in history in the classic CMD editor
F7Show a selectable command-history list
F8Cycle through history entries that begin with the characters already typed
F9Run a history entry by the number shown with F7
EscClear the current command line

History belongs to the current CMD session. Closing the shell normally discards it unless another tool or configuration records commands.

Complete file and folder paths

Type part of a path and press Tab to cycle through matching names. Press Shift+Tab to cycle backward. For example:

cd D:\Pro

Pressing Tab may complete it to a matching folder such as:

cd D:\Projects

CMD adds quotes when needed in many completion scenarios, but always inspect the resulting path before running a destructive command.

Copy and paste

ShortcutAction
Ctrl+C or Ctrl+InsertCopy selected console text
Ctrl+V or Shift+InsertPaste clipboard text
Ctrl+ASelect text according to the current line and console selection state
Ctrl+MEnter Mark mode in the legacy Command Prompt console
Alt+selectionBegin block selection in supported console-host behavior

Ctrl+C has two meanings: it copies when console text is selected, but it sends an interrupt to a running command when no selection is active. Check whether text is highlighted before pressing it.

Select and inspect console output

ShortcutAction
Shift+arrow keysExtend a text selection in supported selection mode
Page Up/Page DownMove by a page while in Mark mode
Ctrl+Home in Mark modeMove to the beginning of the buffer
Ctrl+End in Mark modeMove to the end of the buffer
Ctrl+Up/Down arrowMove the viewport through output history by one line
Ctrl+FOpen Find in compatible console-host windows

Windows Terminal also supports mouse selection, scrolling, and configurable key bindings. If a shortcut behaves differently there, check Terminal settings because a terminal-level binding can take precedence over the hosted CMD session.

Stop or close a command

  • Ctrl+C interrupts many running console commands when no text is selected.
  • Ctrl+Break is recognized by some console programs and keyboards, but not every device has a Break key.
  • Alt+F4 closes the active Command Prompt or Terminal window. This terminates programs running in that window and can lose unsaved work.
  • Type exit to close the current CMD shell cleanly. In a Windows Terminal tab that was started from PowerShell, exit may return to the parent shell or close the tab depending on how CMD was launched.

Useful editing examples

Reuse a previous command with a small change

Press Up to recall the command, use Ctrl+Left to jump between words, edit the target, then press Enter:

copy "D:\Drafts\report.txt" "D:\Archive\"

Filter history by a prefix

Type the beginning of a command, such as ip, then press F8 to cycle through matching history entries such as ipconfig or ipconfig /all.

Cancel a continuous command

Run a continuous ping:

ping -t example.com

Press Ctrl+C with no selected text to stop it and show the summary.

Enable Ctrl shortcuts in the legacy Console Host

Ctrl-key copy and paste are enabled by default on current Windows configurations. If an older or customized Windows Console Host has them disabled:

  1. Open Command Prompt.
  2. Right-click the title bar and choose Properties.
  3. On Options, enable Ctrl key shortcuts or the related editing option shown by that console version.
  4. Select OK.

Using Command Prompt shortcuts on Windows 10 Picture 2

Using Command Prompt shortcuts on Windows 10 Picture 3

These Properties screens apply to the legacy console host, not the Windows Terminal settings interface. Windows Terminal has its own key-binding and interaction settings.

Command-line shortcuts are not system commands

Keyboard shortcuts only change how you interact with CMD; they do not grant administrative rights or make an unsafe command safe. Before pasting a command, understand its paths, wildcards, switches, and permission requirements. A pasted line can execute immediately if it contains a newline.

TipsMake's guide to opening Command Prompt in Windows 10 and 11 explains normal and elevated sessions. The list of common CMD commands provides safe file and network examples, while the broader Windows keyboard shortcut guide covers desktop and application shortcuts.

Microsoft maintains the current Windows keyboard shortcut reference, including a dedicated Command Prompt section.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.