How to open a website in Terminal?

Discussion in 'Mac Apps and Mac App Store' started by domenator, Mar 8, 2009.

  1. domenator macrumors newbie

    Joined:
    Apr 10, 2008
    #1
    Hi all, I am at a loss with Google. What I want to know is how do I open a webpage using Terminal? I am doing a lot with Terminal at the moment and was wondering if it is possible. A Ubuntu forums website listed the command as:

    >insert browser of choice here "www.thewebsite.com"

    I have tried this and I simply get the message:

    >-bash: safari: command not found

    Am I missing a command before the browser? Any help would be appreciated. Thanks!
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Using,
    Code:
    open http://www.google.com/
    opened it in Firefox for me (which is my default browser).

    To force Safari,
    Code:
    open -a Safari http://www.google.com/
     
  3. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
  4. domenator thread starter macrumors newbie

    Joined:
    Apr 10, 2008
    #4
    Ah angelwatt you're the best man. That force safari also solved my second question I was going to pose. Topic closed it seems. Thanks for the fast responses all!
     
  5. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #5
    That was the first thing I thought of until I realized the OP wanted to see the page in a GUI browser and not inside Terminal. I've used lynx on occasion to check accessibility of my web site.
     

Share This Page