Can anyone tell me how to open a browser from the Terminal on a Mac?

link|improve this question
feedback

migrated from stackoverflow.com Dec 18 '09 at 20:05

This question came from our site for professional and enthusiast programmers.

3 Answers

Just enter

open "http://www.google.com"

And it'll open it in your default browser

link|improve this answer
1  
open -a "Firefox" "superuser.com"; will open the link in any other application you specify. – kubi Dec 18 '09 at 20:04
feedback

To have your OS X machine open the default browser to a specific page, you just have to type:

open http://example.com/

Simple as pie. The open command was introduced way back on the NeXT operating system, and in its modern incarnation, uses LaunchServices to determine the appropriate application to open the given file or URL.

link|improve this answer
feedback

If you just want to open the browser, without a URL, use open with just the browser name:

open /Applications/Safari.app

open /Applications/Firefox.app

etc.

You can use open to open any application by name.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown