How To Quickly Navigate To A Folder In Terminal On Mac

In Windows 10, you may open cmd in any folder through both typing cmd in the area bar in File Explorer or, really hold down the Shift key and right-click at the explorer window. In the context menu, you’ll see the option to Open command window here. However, there’s no such choice to soon open Terminal on Mac. Once you open a terminal on Mac, it necessarily opens in the home directory, but there are occasions whilst you will must open them in a particular folder in your system. Seems you can open Terminal in any directory on macOS as well. There are three how to cross approximately it.

  1. Use the cd command
  2. Use the Mac’s integrated shortcut
  3. Use a third party app

Quickly Navigate to a Folder in Terminal on Mac

Method I

This is the most traditional method.

Simply, open the terminal, type in the cd command adopted by using the folder direction you want to navigate. For example,

cd ~/Documents

Alternatively, if you’re too lazy to variety the total course name, you can additionally drag a folder (or pathname) onto the Terminal software icon. It’ll immediately seize the trail of the folder, next hit enter.

Method II

While the former technique works, it’s no longer the most productive way to navigate to a folder within the terminal on Mac.

Much like Windows, Mac also lets you open the terminal instantly from a particular folder. However, this feature is buried deep lower than Mac’s setting. Let’s see a way to remedy it.

To get started, go to Procedure Alternatives > Keyboard > Shortcuts > Services.

Find “New Terminal at Folder” within the settings and click the box.

The coolest factor is that this Capabilities paintings in all applications, now not just Finder. You could additionally assign a keyboard shortcut to it. But, I don’t recommend doing that, because the keyboard shortcut can clash with different native shortcuts.

Now, whilst you’re in Finder, simply right-click a folder, cross to Capabilities and you’ll see a brand new selection – New Terminal at Folder. Clicking on which will open Terminal within the present folder

Method III

Alternatively, you can use a number of the third-party apps available to navigate to a folder within the terminal. The single I like to recommend is cdto and OpenInTerminal.

For this article, we are able to use OpenInTerminal app. It’s free and open source.

To get started, Down load OpenInTerminal. As of writing, the most up-to-date edition is OpenInTerminal-Lite 0.4.1.

Once downloaded, head over to the app, unzip it and pass the app to the Functions folder.

Now, you need to add the OpenInTerminal-Lite in your finder’s toolbar. To do so, carry down the Cmd key and drag the app into Finder Toolbar.

Once done, the app suggests you a small icon within the finder window, clicking on which will open Terminal in the current folder.

And that’s about it.

Now, to remove OpenInTerminal, you must first remove it from the Finder toolbar before you delete it from the Purposes folder. To do so, open Finder and pass to View > Customize toolbar. A new window will open, click on and carry OpenInTerminal’s icon and drag it out of the toolbar to remove it from the toolbar. Now, you can cross forward and delete the original app from the Application folder.

All in all, those were a few tips on how to navigate to a folder in terminal on Mac, while it’s now not a live saver, it does store some time in case you use the terminal a lot. In general, I would recommend, using the ‘New Terminal at Folder’ alternative as it’s native in Mac or in case you want folder option, use OpenInTerminal app. Let me know, your thoughts, in the remark section below.