How to Open Mac Terminal in the Current Folder

Open Mac Terminal from Finder (at the Current Folder)

Would not Terminal be more useful now than a Finder window? Find out here how to open a Mac Terminal prompt from Finder (and you’re already in the current folder!).

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 Mac Terminal from Finder (in the Current Folder)

Looking to open a folder? How to open a folder in Finder from Terminal on a Mac.

Time needed: 1 minute

To open a new Terminal command prompt at the current folder on a Mac from a macOS Finder window:

  1. Enable the New Terminal at Folder (or New Terminal Tab at Folder) services. (See below.)

  2. Click the folder you wish to open in a command prompt with the right mouse button.

    Mac Keyboard shortcut: To open the current folder in Terminal, select Go | Enclosing Folder from the menu or press Command  (up arrow) before right-clicking the folder.

  3. Select New Terminal at Folder from the context menu that has appeared.

    New Terminal tab: 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.)
    Open a Mac Terminal window from Finder (at the selected folder)

Now the files: How to Sort Files with Numbers Naturally using “ls”

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.
    Works also with Terminal not open: This works with Terminal open, of course; it also works on the Terminal icon kept in the Dock while Terminal is closed.
    Grab the icon: To drag and drop the current folder from Finder, grab the (admittedly small) icon in the Finder window’s title bar.

or

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:

  1. Select Finder | Services | Services Settings… (or Services Preferences…) from the menu in Finder.
  2. In macOS Monterey 12 and earlier: Go to the Shortcuts tab.
  3. Make sure New Terminal at Folder and New Terminal Tab at Folder are checked under Files and Folders.
    Enable the "New Terminal at Folder" service on your Mac (and add a keyboard shortcut)

How to Add a Keyboard Shortcut for the “Terminal at Folder” Command

To enable opening of Terminal windows or tabs from Finder windows using a custom macOS keyboard shortcut:

  1. Open the services preferences window. (See above.)
  2. Highlight the New Terminal at Folder or New Terminal Tab at Folder entries under Files and Folders.
  3. Click Add Shortcut.
  4. Type the keyboard combination you wish to use for the shortcut.
    Example Terminal at Folder keyboard shortcut: Something like Command Option Shift T could work, for instance.

(How to open Mac Terminal from Finder tested with macOS Sonoma 14.3, Ventura 13.1, Monterey 12.3, Big Sur 11.0, 10.15 Catalina, 10.14 Mojave and 10.13 High Sierra; updated March 2024)

Home » Mac Tips and Resources » How to Open Mac Terminal in the Current Folder