Shortcuts in OSX-Terminal

December 3 2013

There are many useful shortcuts in OSX terminal. You may already know some of
them, but I bet you don’t know all of them. I am providing a cheat sheet of those keyboard shortcuts. I only list those I think are useful, more can be found here. First of all, you may want to enable the meta key.

terminal

####Movement

Command Descriptions
Ctrl + a Go to the beginning of the line (Home)
Ctrl + e Go to the end of the line (End)
Alt + b Back (left) one word
Alt + f Forward (right) one word

####Text

Command Descriptions
Alt + del Delete the word before the cursor.
Alt + d Delete the word after the cursor.
Ctrl + u Cut/delete the line before the cursor position.
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)

####Misc.

Command Descriptions
Ctrl + l Clear the screen, similar to the clear command
Alt + r Cancel the changes and put back the line as it was in the history (revert).
Ctrl + _ Undo

blog comments powered by Disqus