I know this may have been asked several times, however I cannot find a valid method that will work for me.

On El Capitan - I want to add a option to the right click menu (not the services section) that allows me to open a file or directory directly in terminal from the right click option.

Would somebody be able to provide a working method?

  • What's wrong with Services? It already exists as an option there. – Tetsujin Nov 24 '15 at 10:13
  • @Tetsujin - So far it doesn't allow me to open a file in terminal. Only Folders. I previously used XtraFinder which no longer works on El Capitan without disabling a seucrity feature of el capitan. – RandomMath Nov 24 '15 at 10:14
  • hmm… ok. The service is actually 'Open Terminal at Folder' so I guess you're right – Tetsujin Nov 24 '15 at 10:20
  • 1
    How do you want to open the file in terminal? – Joonas Nov 24 '15 at 12:48
  • What would you expect it to do with a file? – Chris Page Nov 28 '15 at 12:21

Exhibit A

As already mentioned in comments, using the built in service definitely works for folders. As for files, if you were to open them in finder, nothing would happen unless you can first established default editors in your .bash_profile.

If you're not dead set on using the right click menu, one way to open a folder location or file with terminal without downloading additional software would be to drag a file or folder onto your Terminal icon in the Dock. I do this often and it works great.

  • It may be worth pointing out where you can find the dialog pictured in the image here (System Preferences > Keyboard > Shortcuts or under [current application menu] > Services > Services Preferences); it's not entirely intuitive. – Weston C Mar 28 '18 at 5:42

As an addition You can add alias in Your .bash_profile:

alias cdf="eval \"cd \\\"\\\`osascript -e 'tell app \\\\\\\"Finder\\\\\\\" to return the POSIX path of (target of window 1 as alias)'\\\`\\\"\""

This will not solve your problem, but You can use existing Terminal window and cd to selected directory in Finder by cdf command.

  • I prefer this method. Just wanted to note that this is using the last active window if there are multiple windows open. – rwenz3l Apr 20 '17 at 6:19

Here is a small tool that will do the job: https://github.com/qparis/FinderOpenTerminal


There are more utilities of this kind available. E.g. Go2Shell is also a possibility.

  • Can you please go in depth, for example describe what Go2Shell can do? – Brick May 17 '16 at 12:10

When I upgraded to El Capitan, I was able to open terminal at finder as I was before and never had to try to make it work again.

You must log in to answer this question.

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