Open terminal at folder on Mac, and land in the right place

"New Terminal at Folder" is a macOS service. When you pick it on a folder in the Finder, macOS opens a new Terminal window whose working directory is already that folder. The shell starts inside it, so the first command you type applies there, with no cd and no dragging a path into the window. Its sibling, "New Terminal Tab at Folder", does the same thing in a new tab of the Terminal window you already have open. That is the whole meaning. The rest of this page covers where the item hides, why it sometimes does not appear, the other ways to get the same result, and how to check that the shell really landed where you expected.

What "at folder" changes, in one sentence

Every shell session has one working directory. Relative paths, ls with no arguments, git status, npm install, and any tool that looks for a config file in "the current folder" all resolve against it.

When Terminal is started from the Dock, from Launchpad, or from Spotlight, a new window opens in the home folder, the one at /Users/yourname. Nothing about the Finder window in front of you is passed along. "At folder" means the working directory is set to the folder you chose instead of home.

That sounds like a small convenience, and mostly it is. The reason it matters is the failure case. A command that expects to run inside a project, run from home instead, does not always fail loudly. git status in the home folder simply reports that there is no repository. A cleanup command with a relative path can act on a different tree than the one on screen. So the useful habit is not only knowing how to open a terminal at a folder, but also confirming where it opened, which takes one command:

pwd

pwd prints the working directory. If it shows the folder you meant, carry on. If it shows /Users/yourname, the route you used did not pass the folder along.

Where Apple puts it: the path bar and the Services menu

Apple's Terminal User Guide documents the route under the heading "Open new Terminal windows or tabs from the Finder". It goes through the path bar, the strip at the bottom of a Finder window that shows the chain of folders from the disk down to where you are.

  1. Open a Finder window and go to the folder you want.
  2. If there is no path bar at the bottom, choose View > Show Path Bar.
  3. Control-click (or right-click) the folder in the path bar.
  4. For a new window, choose Open in Terminal. For a new tab, choose Services > New Terminal Tab at Folder.

The path bar route is useful because it works on the folder you are currently inside, not only on a folder you have selected. If you are looking at the contents of Reports and want a terminal there, the path bar is where Reports itself can be clicked.

The second place is the ordinary context menu. Control-click a folder in the file list or on the desktop, open Services (on some setups the items appear directly at the bottom of the menu), and choose New Terminal at Folder or New Terminal Tab at Folder. This works on a selected folder. It does not appear when the selection is a file, because the service is defined for folders.

The practical difference: the path bar route opens a terminal in the folder you are standing in, while the context menu route opens it in the folder you clicked on, which may be a child of where you are.

Why the menu item is sometimes missing

Several readers who search this phrase have seen the name somewhere, in a menu or a shortcut list, and then cannot find it again. There are three common reasons.

The service is switched off

Services can be turned on and off individually. Open System Settings > Keyboard, click Keyboard Shortcuts, and choose Services in the list on the left. Under Files and Folders you will find New Terminal at Folder and New Terminal Tab at Folder, each with a checkbox. If the box is clear, the item does not appear in the Finder menus. Ticking it brings it back.

A file is selected, not a folder

As noted above, the services accept folders. With a document selected, they are not offered. Select the enclosing folder, or use the path bar instead.

Too many services, so macOS folds them

When many apps add services, macOS collects them into a Services submenu rather than listing them directly. The item has not vanished, it has moved one level down.

Other ways to land in the same place

The Finder service is one of several routes. They differ in how many steps they take and in what they set as the working directory.

Route Steps Lands in
Path bar, Open in Terminal Control-click in path bar, one click The folder shown in the Finder window
Context menu service Control-click a folder, Services, one click The selected folder
Drag a folder onto the Terminal icon in the Dock One drag The dragged folder
open -a Terminal . from an existing shell One command The shell's current folder
Type cd , then drag a folder into the window Type, drag, Return The dragged folder, in the existing window
Terminal setting "Same Working Directory" Set once, then Command-T The folder of the active tab

Dragging onto the Dock icon

Dropping a folder onto the Terminal icon in the Dock opens a new window at that folder. It is the shortest route when the folder is visible on screen and the Dock is not hidden.

The cd and drag trick

Typing cd, a space, and then dragging a folder from the Finder into the Terminal window pastes the folder's full path, escaped correctly for spaces. Press Return and the existing session moves there. This one does not open a new window. It changes the directory of the session you already have, which is sometimes what you want.

Tabs that inherit the directory

In Terminal > Settings > General, the options New windows open with and New tabs open with each have a working directory choice. Setting new tabs to Same Working Directory means Command-T opens a tab in whatever folder the active tab is in. That is the closest Terminal itself comes to "follow the current working folder", but it follows the previous tab, not the Finder. A new window opened with Command-N still starts wherever the window setting says, so the two options are worth setting together.

Adding a keyboard shortcut

The same Services pane that holds the checkboxes also lets you assign a shortcut. In System Settings > Keyboard > Keyboard Shortcuts > Services, double-click the empty area to the right of New Terminal at Folder and press the combination you want. After that, selecting a folder in the Finder and pressing the keys opens a terminal there.

Two points save time when picking the combination. First, choose something no app you use already claims, or the app's shortcut wins while it is frontmost. Adding several modifier keys, such as Control, Option and Command together with a letter, usually avoids collisions. Second, the shortcut acts on the selection. With nothing selected in the Finder, nothing happens, which looks like the shortcut is broken when it is not.

For people who open a terminal at a folder many times a day, this is usually the single change with the biggest effect. It turns a three-step menu walk into one key press, and it costs nothing.

When the working directory is not what you expected

The routes above set the starting directory, but a few things can change it after the shell starts. When pwd shows something other than the folder you chose, check these.

Your shell startup file runs cd

Files such as ~/.zshrc are read every time an interactive shell starts. If one of them contains a cd line, perhaps added long ago to jump into a projects folder, it runs after Terminal has set the directory and quietly moves the session. Open the file and search for cd. Removing that line, or wrapping it so it only runs when the shell starts in the home folder, fixes the symptom.

Symlinks and aliases

If the folder you chose is reached through a symbolic link, pwd may print the link path, while pwd -P prints the real location on disk. Both are the same place. A Finder alias, by contrast, is not a symbolic link, and some routes resolve it to the original folder, so the path shown can look unfamiliar.

Paths with spaces and non-ASCII names

The Finder routes handle spaces and accented or Japanese characters correctly. Problems appear when a path is typed by hand: an unescaped space splits the path into two arguments, and cd reports that the folder does not exist. Use the drag method or tab completion instead of typing such paths, or wrap the path in quotes.

The Terminal profile runs a command

A Terminal profile can be set to run a command at startup, under Settings > Profiles > Shell. If that command changes directory, every window using the profile will land in the same place regardless of the route.

When the terminal should simply live next to the folder

All of these routes share one assumption: the files are in one app and the shell is in another, and something has to carry the folder across. For occasional use that is fine. For people who switch between looking at files and running commands all day, especially with command line AI agents that work inside a project folder, the hand-off itself becomes the friction.

That is the gap a file manager with a built-in terminal fills. The terminal sits in the same window as the folder view, so there is nothing to open at a folder. Moving to another folder in the sidebar moves the terminal with it, and cd is not typed at all. Some tools in this category also tie a terminal look to a directory, so a production project and a scratch folder are told apart at a glance, and show which terminal is running, waiting for input, or finished. The features page lists what one such tool does, and the comparison page sets it against other approaches.

The trade-off is plain. A separate app is one more thing to install and learn, and the Finder plus Terminal setup above costs nothing and is already on every Mac. If the shortcut route covers the need, it is the right answer.

What to change first

Open the Services pane, make sure New Terminal at Folder is ticked, and give it a shortcut. Then run pwd in the next few windows you open to confirm nothing in your startup files moves them. If the hand-off between Finder and Terminal is still the slow part of the day, Atriens is free to use on a Mac and puts the terminal in the same window as the folder.

Frequently asked questions

Is "New Terminal at Folder" built into macOS or added by an app?

It is built in. It ships with Terminal as a Finder service, alongside "New Terminal Tab at Folder". It can be switched on or off in System Settings > Keyboard > Keyboard Shortcuts > Services, under Files and Folders.

Why does "New Terminal at Folder" not show up when I right-click?

Usually because a file is selected rather than a folder, or because the service is switched off in the Services list. When many apps add services, macOS also folds them into a Services submenu, so check one level down before assuming it is gone.

Can I open a terminal at the folder I am already inside, not one I selected?

Yes. Show the path bar with View > Show Path Bar, control-click the current folder in that bar, and choose Open in Terminal. The context menu in the file list only acts on a selected folder, so the path bar is the route for the folder you are standing in.

Does this work with iTerm2 or other terminal apps?

The built-in services open Apple's Terminal. Other terminal apps can install their own services, which then appear in the same menu and shortcut list under their own names. Check the Services pane after installing one to see what it added.

How do I check which folder my terminal opened in?

Run pwd. It prints the working directory of the session. If it shows the home folder when you expected a project folder, look for a cd line in your shell startup file or a startup command in your Terminal profile.

Back to all posts