59

Sometimes it could be very useful to open new iTerm window. I've seen this feature in Gnome window manager. It is possible to get same feature on MaxOsX? Is there a software to do that?

sensorario
  • 20,262
  • 30
  • 97
  • 159
  • 1
    If you go to iTerm -> Profiles-> Open Profiles then you can create new profiles that will open in a specified directory. Finally, you can name them e.g. Desktop etc – seralouk May 16 '18 at 12:26
  • see also this: http://peterdowns.com/posts/open-iterm-finder-service.html – seralouk May 16 '18 at 12:27
  • updated solution: https://gist.github.com/ralfr/b505b664071980d1bd1f367455342e97 – guillermogfer Nov 05 '18 at 12:37
  • Read the iTerm FAQ, which explains how to do it and is mentioned [below](https://stackoverflow.com/a/67770202/128421). – the Tin Man Jan 30 '22 at 22:02

8 Answers8

97

Go to System Settings -> Keyboard -> Keyboard Shortcuts -> Services -> Files and Folders and give preferred shortcuts.

The shortcut will open iTerm at the selected folder, instead of from the folder that has been opened.

enter image description here

rofrol
  • 14,438
  • 7
  • 79
  • 77
Vignesh Raja
  • 7,927
  • 1
  • 33
  • 42
  • This is a very illuminating answer. – lakewood Oct 11 '19 at 16:57
  • 12
    Thanks!, also you need to select a folder first and then press the shortcuts commands – finalpets Nov 21 '19 at 18:42
  • 14
    for some reason this is not working for me in macOS Monterey (12.2.1): I've tried setting many different combinations and none work, with finder open and a folder selected. – han-tyumi Mar 10 '22 at 21:46
  • On Monterey, configuring a shortcut doesn't override other shortcuts, and even using an unused shortcut doesn't seem to do anything either. – Vadorequest Jan 11 '23 at 09:28
  • Setting to control+option+command+p worked for me, many other combinations do something else and then it doesn't work. – CalM Jun 22 '23 at 12:33
  • For the ones that can not make this to work using this answer (e.g. hearing a beep whenever you press the shortcut), you can follow this: https://superuser.com/a/1581374/1235371 – Amin.A Jul 25 '23 at 08:40
35

You can right-click on the folder where you want iTerm2 to open, then select Services -> New iTerm2 Tab here.

You can also find other options in the Services menu to open iTerm2 and Terminal.

This was tested on iTerm2 3.x and Catalina and above.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
SrinR
  • 923
  • 7
  • 16
  • 27
10

There are two apps called "Go2Shell" and "ShellHere". Both place a small icon at the top of the finder window. When the icon is clicked a terminal window opens in the same directory as the finder window.

Go2Shell

  • Go2Shell can be downloaded from Mac App Store or developer's website. It is possible that you won't be able to install it from Mac App Store, because Go2Shell wasn't updated for a long time.
  • Go2Shell allows users to specify whether to open shell in Terminal or iTerm2.

ShellHere

  • Shellhere can be downloaded from here.
  • ShellHere allows users to open a folder only in uses only MacOS Terminal.
Jirik
  • 1,435
  • 11
  • 18
Natsfan
  • 4,093
  • 3
  • 22
  • 29
  • 2
    Thanks, Go2Shell is awesome. For those of us that despise the app store, it's an easy download here: https://zipzapmac.com/Go2Shell – phil Feb 02 '19 at 01:02
  • Chiming in in 2023 to note that Go2Shell works really well on macOS Monterey. – TSGM Apr 29 '23 at 22:08
7

Problem with current solutions: Doesn't work in current folder. Only if you right click a folder.

So do this:

  1. In Finder, press + + P to show the path bar.

  2. Then, right click your folder and choose the option. Voila!

enter image description here

Hannes Schneidermayer
  • 4,729
  • 2
  • 28
  • 32
3

Try https://github.com/wonderyue/Go2ShellAppleScript. Something like Go2Shell. The latest update of Go2Shell is five years ago, due to the compatibility problem, I make a similar one with AppleScript.

yue
  • 31
  • 2
3

If you want to open iTerm in current Finder position try the following:

OpenInTerminal

https://github.com/Ji4n1ng/OpenInTerminal

Alternative and a bit older

TermHere

https://hashbang.productions/apps/termhere/ (last updated on 2016)

Both work without issues in MacOS Catalina

cdto doesn't support opening the folder in iTerm, so its a no go

billy
  • 81
  • 3
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 26 '22 at 11:13
0

If you have BetterTouchTool, you can just create a Finder trigger with action "Open Active/Selected Folder With Specific App" and select "iTerm". Works for me!

BetterTouchTool screenshot

EDIT: You can even add Hotkey Window hotkey before "Open Active/Selected Folder With Specific App" to open the terminal in the hotkey window (as a tab). Really neat.

In hotkey window

Filip
  • 1
  • 2
  • 1
-1

I've been using cdto forever before accidentally stumbling on to the accepted answer. Will definitely try out the accepted answer, but leaving a link to cdto here if someone finds in useful https://github.com/jbtule/cdto

hdsenevi
  • 953
  • 2
  • 14
  • 27