„The command line in Mac OS X can be a very powerful and fun tool, so it%u2019s good to know how to maneuver around if you find yourself in it. By default, the Mac OS X Terminal uses the Bash shell, which is what these keyboard shortcuts are intended for. So if you%u2019re ready to get your feet wet, open up the Terminal and try these shortcuts out, they%u2019re sure to make your command line life easier. The list isn%u2019t too crazy so you should be able to try all these out within a minute or two, have fun:
Ctrl A Go to the beginning of the line you are currently typing on
Ctrl E Go to the end of the line you are currently typing on
Ctrl L Clears the Screen, similar to the clear command
Ctrl U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl H Same as backspace
Ctrl R Let%u2019s you search through previously used commands
Ctrl C Kill whatever you are running
Ctrl D Exit the current shell
Ctrl Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl W Delete the word before the cursor
Ctrl K Clear the line after the cursor
Ctrl T Swap the last two characters before the cursor
Esc T Swap the last two words before the cursor“