ThisCalculator

Everyday

Open Folder in Finder from Mac Terminal

Updated · Standard formula, shown below

To open the current folder in Finder from the Mac Terminal, type open . and press Return. This tells macOS to open the present working directory in the Finder, giving you a visual view of the files and folders you were just working with in the command line.

Why Use the Terminal to Open Finder?

The Terminal and Finder are two different ways of interacting with your Mac’s file system. The Terminal gives you precise, scriptable control, while Finder offers a graphical, point-and-click interface. Often, you’ll find yourself deep in a directory structure in the Terminal—perhaps after using cd to navigate to a project folder or a configuration directory—and you want to see that same location in a Finder window to drag files, preview images, or use Quick Look. Typing open . is much faster than manually clicking through nested folders in Finder, especially if you’re in a hidden directory like ~/Library or a deeply nested path like /usr/local/etc.

The Basic Command: open .

The open command is a built-in macOS utility that opens files, directories, and applications. When you pass a directory path to it, it opens that directory in the Finder. The dot (.) is a special symbol that represents the current directory. So, open . translates to “open the current directory in Finder.” Here are a few useful variations:

  • open . – Opens the current directory.
  • open /path/to/folder – Opens a specific folder by its full path.
  • open ~/Downloads – Opens your Downloads folder (the tilde expands to your home directory).
  • open .. – Opens the parent directory of your current location.

How to Use It: Step-by-Step

  1. Open the Terminal app (found in Applications > Utilities).
  2. Navigate to the directory you want to open. For example: cd ~/Documents/MyProject
  3. Type open . and press Return.
  4. A new Finder window will appear, showing the contents of that directory.

If you want the Finder window to also become active (come to the front), you can use open -a Finder . which explicitly tells macOS to use the Finder application. In most cases, open . does this automatically, but the -a flag is useful if you have a default file manager override or are in a scripting context.

Common Problems and Solutions

While open . is simple, you might run into a few issues:

  • “The file … does not exist.” This error means the directory you’re trying to open doesn’t exist. Check your current path with pwd (print working directory) to see where you are.
  • Finder doesn’t come to the front. If Finder opens in the background, try open -a Finder . to force it to the foreground.
  • You’re in a directory that requires administrator privileges. If you’re in a protected system directory (like /System), Finder may show an empty window or a permission error. You can still navigate there, but you might need to use sudo for certain actions within Finder—though it’s generally not recommended to modify system files.
  • You want to open a file, not a folder. Use open filename.ext to open any file with its default application. For example, open report.pdf opens the PDF in Preview.

Alternatives and Related Commands

There are other ways to achieve a similar result, each with its own use case:

  • open -R file – Reveals a specific file in Finder, highlighting it in its parent folder. This is handy when you need to locate a file in a large directory.
  • open / – Opens the root directory of your Mac (the top level of the startup disk).
  • open ~ – Opens your home folder, which is the default location for your personal files.
  • open -a "Google Chrome" . – Opens the current folder in a different application, like a text editor or an FTP client. Replace the app name with any installed application.
  • Drag and drop from Terminal – You can also drag a folder from the Finder into the Terminal window to insert its path, then prefix it with open and press Return.

If you find yourself frequently needing to open Finder from Terminal, you might want to create an alias in your shell configuration file (like .zshrc for the default zsh shell). Add a line like alias finder='open .', then restart your Terminal or run source ~/.zshrc. After that, typing finder will do the job.

Understanding the open Command

The open command is part of macOS’s command-line tools and is a wrapper around the Launch Services framework. It determines the appropriate application to handle the file or directory you specify based on file type and user preferences. For directories, the default handler is always Finder unless you’ve changed the default file manager (which is uncommon on macOS). The command also supports many options, such as -a to specify an application, -e to open in TextEdit, and -t to open in the default text editor. You can see the full list of options by typing man open in the Terminal.

Frequently Asked Questions

Why does open . not work in my Terminal?

If you get an error like “The file /Users/username does not exist,” it’s likely because you typed a space or a special character incorrectly. Make sure you’re typing open . (with a space between “open” and the dot). Also, ensure you’re in a valid directory—run pwd to confirm. If you’re in a directory that has been deleted or is inaccessible, the command will fail.

Can I open multiple folders at once?

Yes, you can list multiple paths after the open command. For example, open . ~/Downloads will open both the current directory and your Downloads folder in separate Finder windows. This works for any number of paths.

How do I open the current folder in a new Finder tab instead of a new window?

By default, open . opens a new Finder window. To open a new tab, you can use AppleScript: osascript -e 'tell application "Finder" to make new Finder tab at target (POSIX file "/path/to/folder")'. Replace /path/to/folder with your desired path. This is more advanced but works well for automation.

Is there a way to open Finder from Terminal without typing the dot?

Yes, you can use open $(pwd) which substitutes the current directory path. However, open . is shorter and more common. You could also create a shell function or alias, as mentioned earlier.

Why would I want to use Terminal to open Finder at all?

The main reason is speed and precision. When you’re already in the Terminal navigating a project, using open . saves you from manually clicking through Finder. It’s especially useful for hidden folders (like ~/Library) that are not visible by default in Finder, or for directories that are deeply nested and would take many clicks to reach.

Does open . work on older versions of macOS?

Yes, the open command has been a part of macOS (and its predecessor, Mac OS X) for decades. It works on all modern versions, including macOS Sonoma, Ventura, Monterey, and earlier. The behavior is consistent, though the appearance of Finder may differ slightly.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.