Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Owner Author

magnetikonline commented Dec 26, 2012

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
You can’t perform that action at this time.