OS X Terminal: Jumping Around in Command Text

Something that even longtime users of the Terminal may not know is that you can hop around in a command you’ve typed, eliminating the need to use the arrow keys to move letter by letter. It’s pretty simple, really—hold down the Option key, and your cursor will turn into a little crosshairs symbol. Then just click anywhere in the line, and you’ll jump to that insertion point.

Heads up—I’ve noticed some weirdness if I try to do this when my Terminal window is small enough that the command flows onto multiple lines. 

If that happens to you, just embiggen your window, and you’ll be fine.

Another happy little trick is that you can use Option paired with the left or right arrow key to jump between sections of your typed command (sadly, this is Lion- and Mountain Lion-only). Here’s an example of all the places that your cursor will leap to if you start at the line’s end and continue pressing Option–Left Arrow:

No mouse or trackpad required for that!

And finally, if you’d like to jump right to the beginning or the end of a line in Terminal, use Control-A (beginning) or Control-E (end). Pretty handy stuff if you use Terminal a lot! Or handy even if you know nothing about Terminal and just want to pretend to be a command-line wizard to impress your mom.