Linux Bash Command Line Cheatsheet

Linux Bash Command Line Cheatsheet

Linux Bash Command Line Cheatsheet

Here is a brief Linux, bash shell, command line keyboard navigation and editing cheatsheet.


Navigation and Deletion

Ctrl-b - Move back one character.
Ctrl-f - Move forward one character.

Ctrl-a - Move to the start of the line.
Ctrl-e - Move to the end of the line.
Alt-f - Move forward a word.
Alt-b - Move backward a word.

Backspace - Delete the character to the left of the cursor.
Ctrl-d - Delete the character behind(on) the cursor.
Ctrl-_ - Undo the last thing that the previous operation did. This can be repeated all the way to an empty line. This key is the "minus" key next to the main keyboard 0 key.

Ctrl-l - Clear the screen, reprinting the current line at the top.

Text Yanking Commands (Think Clipboard)

Ctrl-k - Cut the text from the current cursor position to the end of the line.
Alt-d - Cut from the cursor to the end of the current word, or if between words, to the end of the next word.
Alt-DEL - Cut from the cursor the start of the previous word, or if between words, to the start of the previous word.
Ctrl-w - Cut from the cursor to the previous whitespace. This is different than Alt-DEL because the word boundaries differ. 


Ctrl-y - Paste the most recently cut text back into the edit line buffer at the cursor.
Alt-y - Rotate the Cut-ring (clipboard), and past the new top. You can only do this if the prior command is Ctrl-y or Alt-y.

 

Source Information

Links to some source information.

http://web.mit.edu/gnu/doc/html/features_7.html

https://www.google.com/search?q=putty+ssh+command+line+edit

https://www.google.com/search?q=bash+shell+keyboard+shortcuts