Bash Shortcut

Movement

CTRL-a – Go to the beginning of the line.

CTRL-e – Go to the end of the line.

CTRL-b – Move cursor backward one character.

CTRL-f – Move cursor forward one character.

ALT-b – Move cursor backward one word.

ALT-f – Move cursor forward one word.

Editing

ALT-c – Capitalize the letter at cursor and move to the end of the word.

ALT-u – Capitalize the letters starting at the cursor until the end of the word.

ALT-l – Uncapitalize the letters starting at the cursor until the end of the word.

CTRL-u – Delete line

CTRL-k – At cursor, cut until the end of the line.

CTRL-w – Before cursor, cut one word including punctuation.

ALT-d – At cursor, cut one word including punctuation.

CTRL-y – Paste.

ALT-. (dot) – Paste last word from previous command.

CTRL-d1. Delete one character at the cursor (delete) 2. On empty command it will end the session.

CTRL-h – Delete one character behind the cursor (backspace).

ALT-r – Undo.

Command History

CTRL-r – Reverse search command.

CTRL-s – Forward search command. You might need to disable stop signal by typing stty stop undef.

CTRL-g – Cancel search.

CTRL-o/m – Execute command from search.

CTRL-j – Copy command to shell.

CTRL-p – Move back one command.

CTRL-n – Move forward one command.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *