Shortcut | Description |
---|---|
Ctrl + r | search the history backwards |
Ctrl + p | previous command in history |
Ctrl + n | next command in history |
Ctrl + g | quit 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 |
!! + Return | execute the last command again (useful when you forgot sudo: sudo !! ) |