Basic editing 15
On a Mac, the Alt chords of Emacs mode work only after Terminal or iTerm2 is set to treat the Option key as Alt; the Esc sequences listed in the same cells do not use that key.
| Action | Windows mode | Emacs mode |
|---|---|---|
| AcceptLineRuns what is typed; unfinished input, such as an unclosed quote or bracket, gets a continuation prompt on a new line instead. | Enter | Enter |
| AddLineStarts another line under a continuation prompt without running anything, so several lines can go in as one command. | Shift+Enter | Shift+Enter |
| InsertLineAboveOpens an empty line above the one being edited and puts the cursor at its start, wherever the cursor was. | Ctrl+Enter | — |
| InsertLineBelowOpens an empty line below the one being edited and puts the cursor at its start. | Ctrl+Shift+Enter | — |
| BackwardDeleteCharRemoves one character to the left of the cursor; in Emacs mode Ctrl + Backspace does the same instead of cutting a word. | BackspaceorCtrl+H | BackspaceorCtrl+BackspaceorCtrl+H |
| DeleteCharRemoves the character the cursor is on. | Delete | Delete |
| BackwardKillWordDeletes from the start of the word up to the cursor; the removed text goes to the kill ring. | Ctrl+BackspaceorCtrl+W | Alt+BackspaceorEscthenBackspace |
| KillWordDeletes from the cursor up to the end of the word; the removed text goes to the kill ring. | Ctrl+DeleteorAlt+D | Alt+DorEscthenD |
| BackwardDeleteInputDeletes everything before the cursor, back to where the input begins, without adding it to the kill ring. | Ctrl+Home | — |
| ForwardDeleteInputDeletes everything after the cursor, up to where the input ends, without adding it to the kill ring. | Ctrl+End | — |
| UndoTakes back the most recent edit to the input. | Ctrl+Z | Ctrl+_orCtrl+XthenCtrl+U |
| RedoRestores an edit that Undo took back; in Emacs mode the same chord runs Yank instead. | Ctrl+Y | — |
| RevertLineUndoes all edits at once, which clears typed input but leaves a line recalled from history as it was. | Esc | Alt+RorEscthenR |
| DigitArgumentBuilds a number that multiplies the next function, so the digits 1 and 0 followed by # type ten # characters. | Alt+0-9orAlt+- | Alt+0-9orAlt+- |
| Toggle overwrite modeListed in Microsoft's line-editing help as switching between insert and overwrite typing; the PSReadLine function reference has no binding for it. | Insert | — |
Cursor movement 9
| Action | Windows mode | Emacs mode |
|---|---|---|
| BackwardCharSteps the cursor one character left; at the start of a line it can move up to the line before. | Left | LeftorCtrl+B |
| ForwardCharSteps the cursor one character right; at the end of a line it can move down to the line after. | Right | RightorCtrl+F |
| BackwardWordJumps to the beginning of the word under the cursor, or of the word before; the WordDelimiters setting decides where words break. | Ctrl+Left | Alt+BorEscthenB |
| NextWordJumps ahead to where the following word begins; Emacs mode binds ForwardWord, which stops at word ends, instead. | Ctrl+Right | — |
| BeginningOfLineJumps to where the current line begins; pressed again in multi-line input, it jumps to the beginning of the whole input. | Home | HomeorCtrl+A |
| EndOfLineJumps to where the current line stops; pressed again in multi-line input, it jumps to the very end of the input. | End | EndorCtrl+E |
| GotoBraceJumps to the bracket, brace or parenthesis that pairs with the one at the cursor. | Ctrl+] | — |
| CharacterSearchReads one more key and searches forward for that character; a numeric argument asks for the nth occurrence. | F3 | Ctrl+] |
| CharacterSearchBackwardReads one more key and searches backward for that character; a negative argument turns the search forward. | Shift+F3 | Ctrl+Alt+] |
Selection and clipboard 12
Microsoft prints the Copy binding as Ctrl+C with a capital C. In PSReadLine chord names a capital letter means Shift is held, so Copy is Ctrl + Shift + C while plain Ctrl + C runs CopyOrCancelLine. Alt + Shift + B in the Emacs column is printed as Alt+B for the same reason.
| Action | Windows mode | Emacs mode |
|---|---|---|
| SelectAllSelects the whole input line; Emacs mode uses this chord for BeginningOfLine instead. | Ctrl+A | — |
| SelectBackwardCharExtends the selection one character to the left. | Shift+Left | Shift+Left |
| SelectForwardCharExtends the selection one character to the right. | Shift+Right | Shift+Right |
| SelectBackwardWordExtends the selection back over the word before the cursor. | Ctrl+Shift+Left | Alt+Shift+B |
| SelectNextWordExtends the selection forward over the word after the cursor. | Ctrl+Shift+Right | — |
| SelectBackwardsLineExtends the selection from the cursor back to where the line starts. | Shift+Home | Shift+Home |
| SelectLineExtends the selection from the cursor forward to where the line ends. | Shift+End | Shift+End |
| SelectCommandArgumentSelects one argument of the command; pressing again moves to the following argument, ready to be replaced by typing. | Alt+A | Alt+A |
| CopyCopies the selected text to the system clipboard, or the entire line when nothing is selected. | Ctrl+Shift+C | — |
| CopyOrCancelLineCopies when text is selected; with no selection it cancels the line being typed. | Ctrl+C | Ctrl+C |
| CutMoves the selected text to the system clipboard; in Emacs mode this chord only starts two-key sequences. | Ctrl+X | — |
| PasteInserts the clipboard in one piece, so multi-line text is parsed as a whole rather than line by line. | Ctrl+VorShift+Insert | — |
History 8
| Action | Windows mode | Emacs mode |
|---|---|---|
| PreviousHistorySteps back one entry in PSReadLine history and puts it on the line in place of the current input. | Up | UporCtrl+P |
| NextHistorySteps forward one entry in PSReadLine history, replacing what is on the line. | Down | DownorCtrl+N |
| HistorySearchBackwardRecalls the previous history entry that begins with the text between the line start and the cursor. | F8 | — |
| HistorySearchForwardMoves forward again through history entries that begin with the text left of the cursor. | Shift+F8 | — |
| ReverseSearchHistoryStarts an incremental search backward through history; the match updates with each character typed. | Ctrl+R | Ctrl+R |
| ForwardSearchHistoryStarts an incremental search toward newer history entries, the opposite direction of ReverseSearchHistory. | Ctrl+S | Ctrl+S |
| YankLastArgInserts the last argument of the previous history line; repeated presses walk further back through history. | Alt+. | Alt+.orAlt+_orEscthen.orEscthen_ |
| ClearHistoryEmpties the history kept by PSReadLine and leaves PowerShell's own history untouched. | Alt+F7 | — |
Completion and prediction 5
Outside Windows, Emacs mode starts with no key for MenuComplete: PSReadLine adds the Ctrl + Space binding of that mode on Windows only, so on Linux and macOS the function has to be bound by hand.
| Action | Windows mode | Emacs mode |
|---|---|---|
| TabCompleteNextFills in the next matching completion for the text at the cursor; Emacs mode gives this key to Complete instead. | Tab | — |
| TabCompletePreviousSteps back to the completion offered before the current one. | Shift+Tab | — |
| MenuCompleteShows the possible completions as a menu below the line; arrow keys choose one and Enter accepts it. | Ctrl+SpaceorCtrl+@ | Ctrl+Space |
| SwitchPredictionViewFlips the prediction display between its two styles, InlineView and ListView. | F2 | F2 |
| ShowFullPredictionTooltipOpens the full tooltip for the prediction highlighted in the list view. | F4 | F4 |
Screen and help 9
The four scroll bindings exist on Windows only, in both edit modes: PSReadLine does not create them on Linux or macOS.
| Action | Windows mode | Emacs mode |
|---|---|---|
| ClearScreenWorks like the cls or clear commands, but keeps the line being edited and redraws it at the top. | Ctrl+L | Ctrl+L |
| ScrollDisplayUpScrolls the console view back by one screenful. | Page Up | Page Up |
| ScrollDisplayDownScrolls the console view forward by one screenful. | Page Down | Page Down |
| ScrollDisplayUpLineScrolls the console view up by a single line. | Ctrl+Page Up | Ctrl+Page Up |
| ScrollDisplayDownLineScrolls the console view down by a single line. | Ctrl+Page Down | Ctrl+Page Down |
| ShowCommandHelpOpens the cmdlet's full help in a pager on an alternate screen and returns to the same cursor position on exit. | F1 | F1 |
| ShowParameterHelpDisplays help for one parameter under the command line; the cursor must sit right after the full parameter name. | Alt+H | Alt+H |
| ShowKeyBindingsLists every key that currently has a function bound to it. | Ctrl+Alt+? | Ctrl+Alt+? |
| WhatIsKeyShows a what-is-key prompt, then names the function bound to the next chord pressed. | Alt+? | Alt+? |
Additional Emacs bindings Emacs mode only 25
| Action | Windows mode | Emacs mode |
|---|---|---|
| KillLineCuts from the cursor to where the input ends and stores the text in the kill ring. | — | Ctrl+K |
| BackwardKillInputCuts everything before the cursor, back to where the input begins, into the kill ring. | — | Ctrl+UorCtrl+XthenBackspace |
| UnixWordRuboutCuts back to the start of the word into the kill ring; Windows mode gives this chord to BackwardKillWord. | — | Ctrl+W |
| YankInserts the last killed text into the input; Windows mode uses this chord for Redo. | — | Ctrl+Y |
| YankPopRight after a Yank, swaps the inserted text for the next entry of the kill ring. | — | Alt+YorEscthenY |
| YankNthArgInserts the first argument of the previous history line; a numeric argument picks another one, counting from 0. | — | Ctrl+Alt+YorEscthenCtrl+Y |
| SwapCharactersExchanges the character at the cursor with the one in front of it. | — | Ctrl+T |
| UpcaseWordChanges the following word to capital letters (new in version 2.3.0). | — | Alt+UorEscthenU |
| DowncaseWordChanges the following word to small letters (new in version 2.3.0). | — | Alt+LorEscthenL |
| CapitalizeWordGives the following word an initial capital and makes its other letters small (new in version 2.3.0). | — | Alt+CorEscthenC |
| DeleteCharOrExitRemoves the character the cursor is on; on an empty line it ends the PowerShell process instead. | — | Ctrl+D |
| ForwardWordJumps to the end of the word under the cursor, or of the following word when the cursor is between two. | — | Alt+ForEscthenF |
| SetMarkRemembers the cursor position as the mark that a later editing command can use. | — | Ctrl+@ |
| ExchangePointAndMarkSwaps the two positions: the cursor jumps to the mark, and the mark takes the old cursor position. | — | Ctrl+XthenCtrl+X |
| SelectForwardWordExtends the selection to the end of the following word, moving the way ForwardWord does. | — | Alt+Shift+F |
| CompleteCompletes as far as the candidates agree; pressed again at that point, it lists the remaining choices. | — | Tab |
| PossibleCompletionsPrints the candidates that completion would offer for the text at the cursor. | — | Alt+= |
| BeginningOfHistoryJumps to the oldest entry of the history. | — | Alt+< |
| EndOfHistoryReturns from the history to its newest position, the input that was being typed. | — | Alt+> |
| AcceptAndGetNextRuns the input and, at the following prompt, recalls the history entry that came after it. | — | Ctrl+O |
| ValidateAndAcceptLineRuns the input the way AcceptLine does; incomplete input gets a continuation prompt. | — | Ctrl+M |
| AbortCancels the action in progress, such as an incremental history search. | — | Ctrl+G |
| ViEditVisuallyHands the command line to an external text editor, taken from the EDITOR or VISUAL environment variable. | — | Ctrl+XthenCtrl+E |
| ScrollDisplayTopScrolls the console view to its top; Windows mode uses this chord for BackwardDeleteInput. | — | Ctrl+Home |
| ScrollDisplayToCursorScrolls the console view back to the cursor; Windows mode uses this chord for ForwardDeleteInput. | — | Ctrl+End |
No row on this page matches that filter.
Notes
PSReadLine is doing the work
Almost everything on this page is provided by PSReadLine, the line-editing module that ships with Windows PowerShell 5.1 and PowerShell 7. Because the bindings live in the module rather than in the console window, they behave the same whether you run PowerShell in Windows Terminal, the legacy console host, or the VS Code integrated terminal.
The history keys are where PSReadLine earns its keep. Ctrl + R opens an interactive reverse search that narrows as you type — the same muscle memory as Bash. F8 is the quieter alternative in Windows mode: type the first few characters of a command, then press it repeatedly to walk back through every history entry with that prefix. And Alt + . pulls the last argument of the previous command into the current line, which turns two-step sequences like mkdir then cd into a single keystroke.
Completion has two gears in Windows mode. Tab cycles through candidates one at a time, while Ctrl + Space opens a menu you can steer with the arrow keys — far better when a cmdlet has thirty parameters. Once a long command is on the line, Alt + A jumps selection from argument to argument so you can swap values without arrowing through the whole string, and a number typed with Alt + 0-9 repeats the next keystroke that many times.
Making it yours
Run Get-PSReadLineKeyHandler to list every active binding, or press Alt + ? followed by any chord to ask what that key does. If your muscle memory comes from Bash or Vim, Set-PSReadLineOption -EditMode Emacs (or Vi) swaps the whole keymap in one line — add it to your $PROFILE to make it permanent; on Linux and macOS, Emacs mode is already the default. The prediction view toggle on F2 requires PSReadLine 2.2.2 or newer; PowerShell 7.3 and later include it, while stock Windows PowerShell 5.1 needs Install-Module PSReadLine to catch up.
Questions
Why do some of these shortcuts not work in my terminal?
Three usual causes. The edit mode: Linux and macOS start in Emacs mode, where Windows-mode keys such as F8 are not bound, and on a Mac the Alt chords need a terminal that treats Option as Alt. Stock Windows PowerShell 5.1 ships an older PSReadLine, so newer functions like the F2 prediction toggle are missing until you update the module. And host applications can intercept chords before PSReadLine sees them — the VS Code terminal, for example, claims several Ctrl combinations for its own keybindings unless you configure it to pass them through.
What is the difference between Ctrl + R and F8?
Ctrl + R is an interactive search: a prompt appears and the match updates as you type, searching anywhere in the command. F8 is prefix-based recall: it uses whatever is already on your line as the starting text and steps backward through matching history entries, with Shift + F8 stepping forward again. Ctrl + R works in both edit modes; the two F8 keys are bound in Windows mode only.
How do I see every key binding at once?
Run Get-PSReadLineKeyHandler for the table of bound keys in the current edit mode; add -Bound -Unbound to include the functions that have no key. For a single key, press Alt + ? and then the chord you are curious about — PSReadLine reports which function it maps to without executing anything.
Can I make PowerShell behave like Bash?
Yes — Set-PSReadLineOption -EditMode Emacs enables the readline-style keymap that Bash users expect, and -EditMode Vi does the same for modal editing. Put the line in your $PROFILE so every new session starts with it. On Linux and macOS PowerShell already starts in Emacs mode, the second column of the tables.
What does the >> prompt mean after Shift + Enter?
Shift + Enter starts a new line without running the command, and PowerShell shows >> as a continuation prompt for each additional line. While editing multi-line input, pressing Home or End twice jumps to the very first or very last line of the whole block.
Sources and checks
- Microsoft Learn — about_PSReadLine_Functions (PSReadLine 2.3.6) Windows mode and Emacs mode columns: every function with a default binding in Windows mode
- Microsoft Learn — about_Line_Editing Insert key (overwrite mode); default edit mode on non-Windows platforms
- Microsoft Learn — Set-PSReadLineKeyHandler Chord notation: a capital letter in a chord means Shift
- Microsoft Learn — Using PSReadLine key handlers Alt chords on macOS (Option key as Alt)
- PowerShell/PSReadLine on GitHub — KeyBindings.cs (tag v2.3.6) Default binding tables in the module source: Shift in the Copy chord, scroll bindings created on Windows only
- Microsoft Learn — Get-PSReadLineKeyHandler Example listing of the default Windows-mode key handlers with the module's own descriptions (RevertLine)
Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.
6 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.
Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.