How to Navigate to Specific Folders in Terminal on Mac

Many of the guides I’ve posted here for working with images from command line tools assume you’ve navigated to the folder holding the images. Here’s how to do that.

Screenshot of Terminal Window on Mac showing the cd command to navigate folders
Text & Photos By David Coleman
Last Revised & Updated:

I MAY get commissions for purchases made through links in this post.

I’ve posted a number of guides on this site about using various Terminal command line tools to work with images. Tools like ImageMagick, ExifTools, and SIPS.

Something all of them have in common is that it makes things much easier if you’ve navigated to the folder containing the images.

That’s a pretty basic operation in Terminal, and it’s not hard to do. But if you’re new to Terminal, it’s not really self-evident how to do it.

So here are various methods for navigating a Terminal window to the folder you want to work with. I’m posting this here mainly as a resource I can point back to in the various guides I’m putting together.

Hybrid Finder/Terminal Command

In the Terminal console, type cd (with a space after it) and then drag and drop the folder from Finder into the Terminal window.

Press Enter.

Finder Services Menu

This is enabled by default in macOS, but if you don’t see it, you might need to enable it first (more on that below).

In Finder, Right-click (or CTRL-click) on the folder. Choose Services > New Terminal at Folder.

If you don’t see that in the list of available services, you can enable it in System Preferences > Keyboard > Shortcuts > Services and then make sure that New Terminal at Folder is checked.

Basic Terminal Command

In Mac’s Terminal, use the cd (change directory) command to navigate to the desired directory. For example:

cd /path/to/your/folder

You can also do that in steps, such as:

cd path

then

cd to

then

cd your

then

cd folder

And so on. I sometimes find this easier if I don’t recall the specific subfolders off the top of my head.

And while we’re at it, you can move up a folder level with:

cd ..

Keyboard Shortcut

If it’s something you need to do often, you can combine the Services with a custom keyboard shortcut. You can assign that through System Preferences > Keyboard > Shortcuts > Services. Find the service called New Terminal at Folder, double click on none and then press whatever key combination you want to use.

How to Access Terminal on Mac

Terminal is an app that comes preinstalled in macOS. So, if you’re using a Mac, it’s already there. There are various ways to access it.

  • In Finder, go to Applications/Utilities folder and then to Terminal
  • Through a Spotlight search for “terminal”.
  • Through Launchpad. If you have Launchpad on your dock, you can use that by searching in the search bar at the top of the screen for “terminal”. You can also access Launchpad by pressing F4.
Profile photo of David Coleman | Have Camera Will Travel | Washington DC-based Professional Photographer

Text & Photos by David Coleman

I'm a professional photographer based in Washington DC. Seven continents, up mountains, underwater, and a bunch of places in between. I've been shooting for 30+ years, and my my photos and time-lapse videos have appeared in a bunch of different publications from major newspapers to magazines and books, billboards, TV shows, professional sports stadiums, museums, and even massive architectural scrims covering world-famous buildings while they're being renovated. You can see some of my travel photography here and here.

Leave a Comment