#protip: Terminal to Finder and back again

January 1st, 2017. Tagged: mac

Sometimes you browse your files in Finder and want to do some stuff on the command line with these same files. Opening Terminal and navigating to the same file location is lame.


You can simply drag the icon of the file or folder in mind...


...and drop it into a conveniently located nearby Terminal window.

The result is


As you see, the path to the file/folder is now in Terminal. Your cursor is at the end. CTRL+A moves the cursor to the front, so you can type cd for example and navigate to this directory.

Same happens when you drag the icon of the current folder, the one in the title of the Finder window:


Drag that son of a gun and drop into Terminal.

Update: there's another way, see


Once at the location you're happy at in your Terminal, just type open . et voilà!


Where by voilà I mean a Finder window opens.

Tell your friends about this post on Facebook and Twitter

Sorry, comments disabled and hidden due to excessive spam.

Meanwhile, hit me up on twitter @stoyanstefanov