Open current folder in Terminal


Hey there!

I’m new at programming but I’m trying my best to learn as much as I can. In this moment I’m wondering how I could open a current folder I’m in with terminal (Mac) in order to avoid typing the whole path in the command line. Could anyone help me in this way?

Thank you so much in advance.


Ricard, do you mean:

  1. You are looking at the Folders in your Finder, as in you are visually seeing a folder Icon?
  2. You want to then go “open a terminal here”?

On OSX you can just drag the folder to the terminal with your mouse and it will type the path there.

On Windows I think you can do that, and you can also right click and select “open powershell here”, but don’t quote me on that. I’m not at my windows machine right now.


Hi @zedshaw!

I was thinking about 2, “open terminal here”. Is there any other option rather than the drag-and-drop?

Thank you so much Zed.


Edit - Just tried this and it works a treat. Really nice on long dropbox folders:


Thank you so much @gpkesley! That was what I was looking for. I’m now wondering which shortcut could work with this.

Taking advantadge of this topic I would like to ask if there’s a way to add Terminal in the toolbar (I don’t know how to add an app in the tool bar however) and click it to Open terminal here. Maybe that’s too much but it would be a nice option to avoid right-click and so on.

Thank you so much again.


What do you mean by toolbar? The dock?

If so just drag and drop the terminal from the Applications/Utilities folder into the dock and let it go.


Yes, for the dock you can also:

  1. Open terminal
  2. After it’s running, you’ll see it in the Dock. Just right click on the Dock icon and select “keep in dock”.

Also, if you want to do the inverse of “Open terminal here” you can do:

open .

When you’re inside terminal and it will open the current directory in Finder.

You can actually give it anything and it will try to open it. Video files, directories, paths to images, anything. Try it.


@gpkesley, @zedshaw, thank you for your help once again.

Sorry I forgot to post a screenshot of what I understand as toolbar (marked in magenta). Find it attached.

Thank you in advance!


You can’t. If you look at Finder > View > Customise Toolbar, you can add navigational controls and shortcuts but not applications.

To be honest, getting familiar with command line and Terminal is about moving away from interacting with the GUI and becoming more confident with text commands. Zed’s shortcuts certain speed that up too.


Thank you @gpkesley. Missed that on my mac! Thank you @ricard for asking this.


Thank you @gpkesley. Missed that command on my mac! Thank you @ricard for asking this.