Bash Keyboard shortcuts Recall Shortcuts


Example

ShortcutDescription
Ctrl + rsearch the history backwards
Ctrl + pprevious command in history
Ctrl + nnext command in history
Ctrl + gquit history searching mode
Alt + .use the last word of the previous command
repeat to get the last word of the previous + 1 command
Alt + n Alt + .use the nth word of the previous command
!! + Returnexecute the last command again (useful when you forgot sudo: sudo !!)