PowerShell keyboard shortcuts

PowerShell's keyboard behavior comes from PSReadLine. The useful set moves the cursor, edits the current command, searches history, and changes how completion presents its choices.

PowerShell's editing layer is PSReadLine, not the shell grammar itself. Start with cursor movement and line editing, then use history and completion controls to turn commands you already wrote into the next command faster.

Cursor movement

Move by character, word, line, or screen position while editing the current command.

ActionWindowsmacOSLinux
Move to the start of the lineHome does the same.CtrlACtrlACtrlA
Move to the end of the lineEnd does the same.CtrlECtrlECtrlE
Move back one wordCtrlLeftAltBAltB
Move forward one wordCtrlRightAltFAltF

Editing the line

Delete, transpose, transform, or accept parts of the command line before it runs.

ActionWindowsmacOSLinux
Delete the word before the cursorCtrlWCtrlWCtrlW
Delete everything before the cursorCtrlUCtrlUCtrlU
Delete everything after the cursorCtrlKCtrlKCtrlK
Paste from the clipboardCtrlVCtrlVCtrlV
Copy selected text, or cancel the line when nothing is selectedCtrlCCtrlCCtrlC
Undo the last editCtrlZCtrlZCtrlZ
Redo an undone editCtrlYCtrlYCtrlY
Insert the last argument of the previous commandAlt.Alt.Alt.

History

Search and move through previous commands, then reuse or edit the one you need.

ActionWindowsmacOSLinux
Previous history entryDown moves forward through history.UpUpUp
Jump to the previous history entry starting with what you typedCtrl+Shift+Down searches forward the same way.CtrlShiftUpCtrlShiftUpCtrlShiftUp

Completion

Tab behavior depends on your PSReadLine configuration; MenuComplete shows every option instead of cycling one at a time.

ActionWindowsmacOSLinux
List every possible completionIn Emacs mode this exits the shell instead; the binding applies in Windows mode.CtrlDCtrlDCtrlD

Make the useful keys stick

The fastest PowerShell session is usually the one that does not make you retype yesterday's command. Learn history and editing first, then shape completion to suit the way you work.

You do not need this whole page in your head. Pick two shortcuts that remove a repeated hand movement, use them until they feel ordinary, and come back for the next pair.

Make a printable sheet for this app