Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How can I move around the bash commandline efficiently?

I asked the case of cmd.exe here. I want to ask the same question for Mac's Terminal/bash. I know some of the answers, but not everything.

With Terminal/bash, when something's wrong with what I typed? What edit option can I do? I can use arrow key to move cursor one by one, but it would be great if there's a key for

  • Move the cursor by the word not by character both directions (forward/backward)
  • Move the cursor to the start of line
    • I use Control-A
  • Move the cursor to the end of line
    • I use Control-E
  • Delete the word (not a character) under the cursor.
    • I use Escape-Delete key for this purpose.

Or, what would be other useful keys for editing?

share|improve this question
    
possible duplicate of How can I move around the bash commandline efficiently?. In particular, one of the answers to that question includes a link to this page. –  Dennis Williamson Sep 28 '10 at 15:35
add comment

marked as duplicate by Dennis Williamson, random Sep 28 '10 at 23:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

Start 'Terminal'. On the Main Menu, select Help->Terminal Help->Shortcuts for Terminal. This will bring up a page describing the keyboard shortcuts that 'Terminal' understands. Additional information can be found by starting 'Terminal', then typing "info bash ", then typing "n" until you get to the section entitled "Command Line Editing". Happy reading...

share|improve this answer
add comment

Another great one at the Terminal is holding the option (a.k.a. alt) key and then clicking into the location you want to go back to.

When you hold down the option key you will see a + cursor to let you know that you have activated the feature.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.