Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.

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

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

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

Not the answer you're looking for? Browse other questions tagged .