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!
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.