Ask Different is a question and answer site for power users of Apple hardware and software. 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

I quite often find myself needing to move the cursor to the beginning or the end of the line.

Is there a keyboard shortcut or other magic trick to move the cursor apart from the arrow keys.

share|improve this question
up vote 7 down vote accepted

^ + A for the beginning of the line

^ + E for the end of the line.

Works with Cocoa control too.

^ = Ctrl

share|improve this answer
Wolff - Cheers mate! – willcodejavaforfood May 3 '11 at 14:10

You can also hold down the alt key and click with your mouse wherever you want the cursor to jump to.

Note however, that this only works on the same line the cursor currently is on, so if you have a long command wrapping around two lines, you will have to jump to the beginning of the second line, jump one character back (so you´re on the end of the first line now) and then can use the alt+mouse to navigate again.

share|improve this answer

You can use vi-style line movement and modal editing on the command line by adding set -o vi to your ~/.bash_profile.

share|improve this answer

Meta + B is equivalent to ctrl+ in Windows, while
Meta + F is equivalent to ctrl+

by default the Meta key is the Escape, but that's configurable.

share|improve this answer
And how exactly would one reconfigure this? – patrix Nov 20 '12 at 13:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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