Moving the cursor
Ctrl + a
Go to the beginning of the line (Home)
Ctrl + e
Go to the End of the line (End)
Ctrl + p
Previous command (Up
)
Ctrl + n
Next command (Down
)
Ctrl + f
Forward one character
Ctrl + b
Backward one character
Alt + click
on the current line = Jump Backwards
Editing
Tab
Tab completion for file/directory names
Ctrl + u
Cut/delete the Line before the cursor position
Ctrl + q
Cut/delete the whole Line
Ctrl + k
Cut the Line after the cursor to the clipboard
Ctrl + w
Cut the Word before the cursor to the clipboard
ctrl + y
Paste the last thing to be cut (yank)
Ctrl + d
Delete character under the cursor
Ctrl + h
Delete character before the cursor (backspace)
Ctrl + _
Undo
Command
Ctrl + l
Clear screen
Cmd + shift + h
Show paste history
History
abc
then Cmd + ;
list all commands beginning with abc
!!
Execute last command in history
!abc
Execute last command in history beginning with abc
!abc:p
Print last command in history beginning with abc
Ctrl + r
Recall the last command including the specified character(s)
see more: Bash Keyboard Shortcuts