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

Is there any way at all to use the mouse cursor to move the cursor in terminal, like click where you want it and press a key to move it there?

This is one of the most annoying things I've ever found using the terminal

I know Ctrl+A will move to the beginning of the line but sometimes these commands are so long

share|improve this question
up vote 19 down vote accepted

Try option-click, that is, click with option pressed.

This works on the command line and also in screen editors, such as vi and nano.

option-click just sends the appropriate escape sequences to move the cursor to anywhere in the terminal screen. (To see this working, try it with cat.)

share|improve this answer
Didn't know that, wonder if there is a way to make this work in iTerm. – Gerry May 30 '12 at 10:42
@Gerry, ah, finally a feature that Terminal has that iTerm hasn't! – lhf May 30 '12 at 10:58
@Gerry, see Option + click in iTerm. – lhf May 30 '12 at 14:02
This doesn't seem to work for me? Im holding the option button and then clicking on a specific position but instead of taking me to that position it will load the previously ran command!? Im using yosemite and a 2015 macbook pro. – James111 Aug 26 '15 at 1:23

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.