Would not a Terminal command prompt be more useful now than a Finder window? Find out below how to open a Terminal window right at the current (or any) folder straight from Finder.
First, London’s Underground… Underground
For almost 15 years, a small, secret, shadow underground lay bare across London between Liverpool and Paddington Stations. Before, it had been a shortcut for mail to sorting stations; now, it carries people through mail history.
Want a somewhat secret, small and speedy shortcut to a Terminal command prompt already cd’d to the a folder from a Finder window? Here you go:
How to Open a Terminal Window at Any Folder from Finder in macOS
To open a new Terminal command prompt at the current folder from a Finder window:
- Make sure the New Terminal at Folder (or New Terminal Tab at Folder) services are enabled. (See below.)
- Click the folder you wish to open in a command prompt with the right mouse button.
- To open the current folder in Terminal, select Go | Enclosing Folder from the menu or press Command ↑ before right-clicking the folder.
- Select New Terminal at Folder from the context menu that has appeared.
- To open the folder in a new tab in the last-active Terminal window, select New Terminal Tab at Folder instead; if no Terminal window is open, a new one will be created.
- In the context menu’s stead, you can also press the keyboard shortcut, if you have set up a combination for the New Terminal at Folder command. (See below.)
In the Terminal window, note that you can also, vice versa, open a Finder window showing the current directory from the command prompt.
How to Open a Terminal Window at Any Folder from Finder Using Dragging and Dropping
To open a new Terminal window with a command prompt in any folder from a Finder window:
- Drag and drop the desired folder onto the Terminal icon in the Dock.
- This works with Terminal open or the Terminal icon kept in the Dock while Terminal is closed.
- To drag and drop the current folder from Finder, grab the (admittedly small) icon in the Finder window’s title bar.
- Drag and drop the folder onto an existing Terminal window while holding down the Command key to immediately cd to the dropped directory.
How to Enable the “New Terminal at Folder” Service on a Mac
To turn on the New Terminal at Folder service and be able to open command prompts for arbitrary folders fast from Finder windows:
- Select Finder | Services | Services Preferences… from the menu in Finder.
- Make sure New Terminal at Folder and New Terminal Tab at Folder are checked under Files and Folders.
How to Add Keyboard Shortcuts for the “Terminal at Folder” Commands
To enable opening of Terminal windows or tabs from Finder windows with the keyboard:
- Open the services preferences window.
- Highlight the New Terminal at Folder or New Terminal Tab at Folder entries under Files and Folders.
- Click Add Shortcut.
- Type the keyboard combination you wish to use for the shortcut.
- Something like Command Option Shift T could work, for instance.
(How to open a Terminal window at any folder from Finder tested with macOS 10.13 High Sierra; updated January 2018; title image: StockUnlimited)