Open a Selected Finder Folder in a New Terminal Window

Dec 7, 2011 - 8 Comments

Open a New Terminal from the Selected Folder in Mac OS X

If you shuffle between the Terminal and the Mac OS X desktop often, you’ll get good use out of a Services feature which gives the ability to create a new Terminal window (or tab) from a selected folder within the Finder. You have to enable the Service inside System Prefs beforehand though:

  1. Go to System Preferences and click on “Keyboard”
  2. Select the “Keyboard Shortcuts” tab and click on “Services” from the left menu
  3. Scroll on the right until you see “New Terminal at Folder” and check the box next to it to enable the feature
  4. Close out of System Preferences

New Terminal at Folder setting in Mac OS X System Preferences

Now back at the desktop, right-click on any Finder folder to find the new “New Terminal at Folder” service at the bottom of the contextual menu.

New Terminal at Folder in Mac OS X

As expected, a new Terminal window will appear with the selected folder as the present working directory. Use the “New Terminal Tab at Folder” service instead if you regularly have many terminal windows open and like to keep things tidy.

Another approach would be to type “cd ” followed by dragging a folder into the terminal to print the full path, then hitting return to get the same result.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: AJ in Command Line, Mac OS X, Tips & Tricks

8 Comments

» Comments RSS Feed

  1. mark says:

    Lots of good finds in the Services menu

  2. a says:

    Same as Go2Shell?

  3. qka says:

    I think this may be Lion only; I could not find it for Snow Leopard.

  4. Steve says:

    This is a great tip, thanks!

  5. adam says:

    This works in Terminal with space without ” ?!?
    Just drop folder on icon is same way, with fix space with \ …

  6. […] folder in Mac OS X with a click of a button. This is similar to the services option that can be added to the right-click contextual menu, but Go2Shell is faster due to resting in the Finder toolbar and being accessible with a single […]

  7. Nitin Madhok says:

    ​Try this tool: github.com/nmadhok/OpenInTerminal This is a really handy tool for programmers on Mac as it lets you open the folder directly in Terminal or iTerm2. You can select multiple folders to open them in multiple terminal windows. You can also select files to open the parent directory in Terminal. This application works with Finder as well as without Finder which is a plus!

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates