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


1 Answer 1


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.)

  • Didn't know that, wonder if there is a way to make this work in iTerm.
    – Gerry
    Commented May 30, 2012 at 10:42
  • 3
    @Gerry, ah, finally a feature that Terminal has that iTerm hasn't!
    – lhf
    Commented May 30, 2012 at 10:58
  • @Gerry, see Option + click in iTerm.
    – lhf
    Commented May 30, 2012 at 14:02
  • 1
    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
    Commented Aug 26, 2015 at 1:23

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