Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
Last active May 22, 2020 18:55
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save magnetikonline/4366625 to your computer and use it in GitHub Desktop.
Save magnetikonline/4366625 to your computer and use it in GitHub Desktop.
SSH/Readline cheatsheet.

SSH/Readline cheatsheet

Under Emacs mode, typically the default for most shells.

Basic moves
Move back one character Ctrl + B
Move forward one character Ctrl + F
Delete previous character Backspace
Delete current character Ctrl + D
Undo delete step Ctrl + -
Clear terminal Ctrl + L
Moving faster
Move to start of line Ctrl + A
Move to end of line Ctrl + E
Toggle between start and end of line Ctrl + X, X
Move backward a word Alt + B
Move forward a word Alt + F
Cut and paste
Cut from cursor to start of line Ctrl + U
Cut from cursor to end of line Ctrl + K
Cut from cursor to start of word Alt + Backspace
Cut from cursor to end of word Alt + D
Cut from cursor to previous whitespace Ctrl + W
Paste last cut text Ctrl + Y
Loop through and paste prev cut text Alt + Y (after Ctrl + Y)
Completion
Auto complete name Tab
List possible completions Alt + ?
Insert all possible completions Alt + *
Transpose
Swap character at cursor with previous Ctrl + T
Swap word at cursor with previous Alt + T
@richo
Copy link

richo commented Dec 24, 2012

Probably worth noting this is emacs mode - it's the default but it's not the only setting.

@magnetikonline
Copy link
Author

Good point Rich :) Was more for just my own use to print and keep beside my monitor - trying to bake this stuff into the grey matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment