Ctrl+A |
Start of the command line |
Ctrl+E |
End of the command line |
Ctrl+K |
Delete from cursor to the end of the command line |
Ctrl+U |
Delete from cursor to the start of the command line |
Ctrl+W |
Delete from cursor to start of word |
Ctrl+Y |
Paste text that was cut using one of the deletion shortcuts after the cursor |
Ctrl+XX |
Move between start of command line and current cursor position |
Alt+B |
Move backward one word (or go to start of word the cursor is currently on) |
Alt+F |
Move forward one word (or go to end of word the cursor is currently on) |
Alt+D |
Delete to end of word starting at cursor |
Alt+C |
Capitalize to end of word starting at cursor |
Alt+U |
Make uppercase from cursor to end of word |
Alt+L |
Make lowercase from cursor to end of word |
Alt+T |
Swap current word with previous |
Ctrl+F |
Move forward one character |
Ctrl+B |
Move backward one character |
Ctrl+D |
Delete character under the cursor |
Ctrl+H |
Delete character before the cursor |
Ctrl+T |
Swap character under cursor with the previous one |
Ctrl+R |
Search the history backwards |
Ctrl+G |
Escape from history searching mode |
Ctrl+P |
Previous command in history |
Ctrl+N |
Next command in history |
Alt+Dot (.) |
Use the last word of the previous command |
Ctrl+L |
Clear the screen |
Ctrl+S |
Stops the output to the screen |
Ctrl+Q |
Allow output to the screen |
Ctrl+C |
Terminate the command |
Ctrl+Z |
Suspend/stop the command |
foo+Up |
Print out or/and loop through the previous commands that start with foo |
!! |
Run last command |
!foo |
Run the most recent command that starts with ‘foo’ |
!foo:p |
Print out the command that !foo would run |
!$ |
The last word of the previous command (same as Alt+.) |
!$:p |
Print out the word that !$ would substitute |
!* |
The previous command except for the last word |
!*:p |
Print out what !* would substitute |
!?foo:p |
Print out the last command that contains foo |