Open Current Folder in Finder From Terminal
In this article
To open the current folder in Finder from the Terminal, type open . and press Return. This command tells macOS to open the folder you are currently in using the default file manager, Finder.
Why Use the Terminal to Open Finder?
Most Mac users navigate with Finder’s graphical interface, but the Terminal offers a faster, more precise way to jump to a specific directory. This is especially useful when you are already working in the command line—perhaps running a script, editing configuration files, or managing a Git repository—and need to see the files in a visual window. Instead of typing out a long path or clicking through nested folders, open . brings you there instantly.
The command works because open is a built-in macOS utility that opens files, directories, and applications. When given a directory path, it opens that folder in Finder. The dot (.) is a special symbol that represents the current working directory. Together, they form a concise instruction: “open this folder in Finder.”
How the open Command Works
Under the hood, open communicates with Launch Services, the macOS component that decides which application should handle a given file or URL. For a folder, the default handler is Finder. You can also use open with other arguments:
open .– opens the current directory in Finder.open /path/to/folder– opens a specific folder.open ~/Downloads– opens your Downloads folder (the tilde expands to your home directory).open -R file.txt– reveals the file in Finder, highlighting it.open -a Finder .– forces Finder to open, even if another app is set as default.
If you want to open the current folder in a new Finder window rather than an existing one, you can use open -n .. This is useful when you already have Finder windows open and want to avoid switching to one of them.
Basic Terminal Navigation Refresher
To use open . effectively, you need to know where you are. Here are the essential navigation commands:
pwd– prints the current directory path.ls– lists files and folders in the current directory.cd foldername– changes into a subfolder.cd ..– moves up one level.cd ~– goes to your home directory.
For example, if you run cd Documents and then open ., Finder will open your Documents folder. If you are deep in a project directory like /Users/name/projects/myapp/src, the same command will open that exact folder.
Common Problems and How to Fix Them
While open . is simple, a few issues can arise:
- “open: command not found” – This is rare on macOS because
openis part of the system. If you see it, your PATH may be misconfigured. Try using the full path:/usr/bin/open . - Finder opens the wrong folder – Make sure you are in the directory you think you are. Run
pwdto confirm. If you recently usedcdin a script, the working directory may have changed. - Nothing happens – If Finder does not open, check if Finder is running. You can start it with
open -a Finder. - Permission errors – If you get “Permission denied,” you may not have read access to the folder. Try
sudo open .(though this is rarely needed for your own folders).
If you are using a custom terminal emulator or a remote session (like SSH), open will not work because there is no local Finder. In that case, you can use pwd to see the path and then manually type it into Finder’s “Go > Go to Folder” (Cmd+Shift+G).
Alternatives: Other Ways to Open Finder
Besides open ., there are a few other methods:
- Drag and drop – Type
cdin Terminal, then drag a folder from Finder into the Terminal window. This pastes the full path. Then press Return to change to that directory, and useopen .to open it. - Finder’s Go to Folder – Press Cmd+Shift+G in Finder and type the path (e.g.,
/Users/name/projects). This is handy if you already have Finder open. - Third-party tools – Some users install utilities like “Open in Terminal” or “cd to” that add a button to Finder’s toolbar. These work in reverse: they open a Terminal window from a Finder folder. They are not necessary for the basic task but can speed up workflows.
For power users, you can also create an alias in your shell configuration file (like .zshrc) so that typing finder runs open .. Add this line: alias finder='open .'. Then restart your terminal or run source ~/.zshrc.
Frequently Asked Questions
What does the dot (.) mean in the command?
The dot is a special directory name that refers to the current working directory. It is a standard convention in Unix-like systems. So open . literally means “open the directory I am currently in.”
Can I open the current folder in a new Finder window?
Yes, use open -n .. The -n flag tells open to open a new instance of the application (Finder) rather than bringing an existing window to the front.
How do I open the current folder in VS Code or another editor?
For Visual Studio Code, you can type code . to open the current folder in the editor. For Sublime Text, use subl .. These commands work only if you have installed the command-line tools that come with those editors.
Why does open . not work when I am in a remote SSH session?
Because open relies on macOS’s Launch Services to open an application on your local machine. When you are connected to a remote server, there is no local Finder to open. You need to use a different method, such as copying the path and using Finder’s “Go to Folder.”
Is there a way to open the current folder in Finder and select a specific file?
Yes, use open -R filename. The -R flag reveals the file in Finder, highlighting it. This is useful when you want to see where a file lives without navigating manually.
Does this work on older macOS versions?
Yes, the open command has been part of macOS (and its predecessor, Mac OS X) for decades. The behavior is consistent across versions, though some flags like -n have been available since early releases.