Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to open Safari (on OS X 10.8) from the terminal by executing the following:

open -a /Applications/Safari --args ""

Safari opens and tries to navigate to the url:


Is there a way to get Safari to open up the browser at the specified url?

Note: I can't do open because I can't be guaranteed that the Safari is the default browser. (And before I'm asked why I'm not using the default browser - I'm doing browser specific test automation.)

share|improve this question
up vote 4 down vote accepted

It would seem the answer is:

open -a safari

According to the man page for open(1), open -a <applicationName file> opens a given file with a given application. Therefore, this seems like the most appropiate syntax.

This forum thread and this trac page for a multi platform file manager explain more.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.