Apple - How to open a new tab in iTerm in the same folder as the one that is open?

Select "Reuse previous session's directory" from the preferences of your profile:

Alternatively click on "Advanced Configuration" then "Edit..." so you can set the working directory separately for new windows, new tabs & new split panes


This is a year old, but I'd like to add a response that isn't so heavy-handed. The accepted answer will open the previous directory every time you open a new tab, which I personally find frustrating. I feel it's easier to always open in the home directory and then open the current directory in a new tab as needed.

To do that, simply run the following command:

open . -a iterm

That will open the current directory (open .) using the application (-a) that most closely matches iterm.


To bind a special keybinding to this:

  • go to Settings ( Cmd ⌘ + ,)
  • then keys
  • select the + sign
  • choose a keybinding
  • select the duplicate tab action.

Tags:

Terminal

Iterm