If you work in the terminal a lot, like I do, I’m sure you’ve typed in a long command and misspelled something or forgotten a flag along the way. If you just forgot to sudo, or do something at the beginning of the command, just press UP ARROW to recall the command and CTRL+A to return to the beginning of the line.

If you made the mistake in the beginning of the line, it’s a bit more of a pain in the ass to get there. You can either hold LEFT ARROW til you get where you want (annoying) or use ESC-B to go back one word at a time.

While I was looking up the key command for back one word, however, I discovered this awesome trick: you can set your terminal to position the cursor with an OPTION(ALT) + MOUSECLICK by opening Terminal and setting a preference in Terminal > Window Settings > Emulation > Option click to position cursor.

Via: http://www.freesmug.org/tutorial/tips/terminalkey