OS X Lion: Open a Folder’s Location in Terminal


First, let’s add a new option to the Services menu. So go to System Preferences > Keyboard and click on the Keyboard Shortcuts tab. Choose Services from the left-hand column, and then from the list that appears on the right, toggle on the New Terminal at Folder option, which is under the Files and Folders section. Whew!

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

From then on, you can right- or Control-click on any folder in the Finder and choose Services > New Terminal at Folder.

When you do, Terminal will open and automatically change its working directory to be the folder you right-clicked on. 

If you’re sharp-eyed, you probably noticed that there’s a related option in that same place in System Preferences > Keyboard > Keyboard Shortcuts, labeled New Terminal Tab at Folder. You can toggle this on, too, if you’re a fan of using tabs for Terminal work instead of windows.

And finally, another cool way to open a folder’s location in the Terminal is to just drag it from the Finder and drop it on the Terminal’s icon in the Dock. 

Boy, those Dock icons have all kinds of uses, don’t they? They’re like a virtual smorgasbord of handiness. 

No, I don’t really know what that means, either. Don’t you judge me.

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.