OS X Terminal: Jumping Around in Command Text


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. 

Don’t miss the best of The Mac Observer

Set us as a preferred source and our Apple reporting ranks higher in your Google Search results and Discover feed — one tap, no account changes.

Or get it by email



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.

Discussion

Join the discussionCommenting as a guest — your email is never published · Log in

Protected by Akismet — be kind, stay on topic.

This site uses Akismet to reduce spam. Learn how your comment data is processed.