Would not Terminal be more useful now than a Finder window? Find out here how to open a command prompt at any folder 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 folder from a Finder window? Here you go:
How to Open a Command Prompt 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.
- Keyboard shortcut: 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.
- Tip: 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, your Mac will create a new one.
- Keyboard shortcut: 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.
- Note: This works with Terminal open, of course; it also works on the Terminal icon kept in the Dock while Terminal is closed.
- Tip: 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 using a custom macOS keyboard shortcut:
- 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.
- Tip: Something like Command Option Shift T could work, for instance.
(How to open a command prompt at any folder from Finder tested with macOS 10.14 Mojave and 10.13 High Sierra; updated December 2018; title image: StockUnlimited)