Jumping between Terminal and Finder

Jumping between Terminal and Finder

Depending on the situation, sometimes Finder can be the best way to interact with the file system and sometimes Terminal is better. There are a couple of little tricks for jumping.

Jump from Finder → Terminal

Tip #1

Terminal has two Services available called New Terminal Tab and New Terminal Tab at Folder.

With a folder selected in Finder, choose Finder → Services from the menu bar and choose one of the two options. Note this is quickly accessed in the contextual menu. This causes a Terminal window or tab to open, rooted at the folder you chose.

You’ll note that one of the commands has a keyboard shortcut. You can set this up in System Preferences → Keyboard → Shortcuts → Services

Tip #2

If you’re drag-n-drop oriented, you can drag any folder into an open Terminal window and the path will get pasted in. If your goal is to get into the folder easily, Tip #1 will probably be easier. Otherwise, you can type a command like “ls -alR’ into Terminal, drag a folder in from Finder and you have your path argument.

Jump from Terminal → Finder

This one is pretty straightforward, using the “open” command.

# Opens a Finder window at that path

open <path>
# Opens a Finder window at the current working directory

open .