
The screenshot above shows this in action while the PWD within the Terminal is the /Applications directory, thus the Applications folder is opened in the Finder. Or if your CWD is /etc/ and you want to access that directory immediately in Finder, type ‘open. that folder will be opened in the Finder. This can actually be a really helpful way to modify and adjust buried system files if you found them through the command line but now need to interact with them in the Finder.įor example if you’re digging around in /Library/Preferences/Mozilla/ and type open. You can do this from anywhere in the command line as long as you’re in a local path, but it doesn’t matter if it’s system files or user files, you can launch it into the Finder.
#Open terminal from finder mac
” (yes that is a period, and yes it is required) will open the present working directory (PWD in the world of UNIX acronyms) in the Terminal / Command line into the Finder of the Mac – you know, the visual file system. It turns out such a feature exists in OS X Services, though a user must enable the “New Terminal at Folder” service to gain such functionality, which is then accessible with a Right-Click on any directory within Finder.How to Open the Current Directory in a Finder Window from Terminal on a MacĪssuming you’re already in the Terminal application, found in /Applications/Utilities/ the command to type is as follows:
#Open terminal from finder how to
The next logical question may be how to do this in reverse that is, how to open a new Terminal.app window set to the present directory as viewed in Finder. The precise location of the application binary may vary per individual application, when in doubt look within the “name.app/Contents/” directories to find it. Open /Applications/Sample.app/Contents/MacOS/Sample If it’s not working to launch the app in question, sometimes you may need to point the open string at the applications binary contained within the. Open /System/Library/CoreServices/Finder.appĪgain, this can used for any other application throughout OS X, just be sure to point it at the app. To do that, simply enter the following command string into the terminal: Staying on the “Finder” topic, the Finder application can be launched like another app if it has crashed or is quit for some reason. This provides the ‘open’ command the ability to relaunch applications that are system specific, like any other app. Note that Open can also be used to launch applications and perform other tasks. Open /System/Library/Application\ Support/iTunes/Defaults/Preferences/ This can make for a great way to leap to deeply embedded system directories thanks to tab-completion:

You can also specify directories to open from the terminal into the Finder, like so: Using ‘open’ from the command line to jump to the Current Folder (PWD) in the Finder was discussed here specifically. For instance, if you have just launched Terminal which defaults to the users home folder, typing that in the command line will immediately open your home directory, but you can be anywhere and it works the same. The “.” (period) has long been a UNIX reference to the present working directory (PWD, sometimes called Current Working Directory or CWD), and it changes according to where the terminal is located. What if you’re buried deep in the file system within the Terminal, and need to open that deep path in the Finder? Immediately accessing the present working directory in a new Finder window is quickly achieved by typing the following command string in the Terminal:

Opening the User Home Directory can be achieved as follows: Opening the Root directory in Finder is simple too: The general syntax to use for this is as follows:įor example, if you want to open the folder which contains the aforementioned Finder application (which would then allow you to open it with a double-click), you can use the following command syntax:
#Open terminal from finder mac os
How to Open Finder Windows from Terminal in Mac OS

This means you can jump to directories and open literally any Mac Finder window directly from the terminal by using a simple command string based upon the ‘open’ command.
