156

This question already has an answer here:

I use command line a lot, like most programmers. I want to be able to launch Finder, Safari or any other application for that matter from command line e.g.

finder .

where it will start Finder app, and the set the view to the current folder that I am in at the command line.

marked as duplicate by bmike Sep 10 '13 at 22:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    I disagree that this is a duplicate. I found this when Finder was force quitted and I wanted to launch it again. The other question doesn't address this aspect of the problem, this one does. – razzed Aug 6 '14 at 14:14
  • 3
    I agree: not a duplicate. This question is about how to launch the program. The other is just about how to open a new window. – Andrew Swift Mar 31 '15 at 8:14
236

To open your current directory in Finder from Terminal, type open .

So, if you want Documents: open Documents

Library: open /Library

Downloads: open Downloads

And so on.

  • 58
    Boom! open . is the winner here. – bmike Sep 10 '13 at 22:33
  • Oops. Didn't realize it had a duplicate already. I knew the answer so I just answered it. – Dave Sep 11 '13 at 1:38
  • 1
    you did fine - linking the dupes helps with search terms. Your answer or this questions' words get indexed so that people searching the internet find the right answer. – bmike Sep 11 '13 at 1:40
  • 1
    This doesn't work if your current directory is an application, like /Applications/Something.app. It will open that app instead of finder. – Segfault Jul 3 '14 at 20:53
  • 9
    @Segfault To force it to open an application as a file in Finder, rather than the open the application itself, use the -R option: "-R Reveals the file(s) in the Finder instead of opening them." For example, you can do cd /Applications/Preview.app; open -R . and it will open Finder, not Preview. – AmadeusDrZaius Jun 23 '15 at 20:19

Not the answer you're looking for? Browse other questions tagged .