How to Open a Website from Terminal

By  on  

Every once in a while I want to open a website from the terminal ... just because.  Maybe it's because it makes me feel just a bit more hardcore, you know, not clicking a GUI icon.  Anyways, opening a browser via the command line is dead simple:


That execution will open the URL in the system's default browser.  If your prefer a specific browser, you can so specify:

open -a "Google Chrome Canary"

Open a URL from the command line -- you'll feel like a true pro.

Recent Features

  • By
    I’m an Impostor

    This is the hardest thing I've ever had to write, much less admit to myself.  I've written resignation letters from jobs I've loved, I've ended relationships, I've failed at a host of tasks, and let myself down in my life.  All of those feelings were very...

  • By
    9 More Mind-Blowing WebGL Demos

    With Firefox OS, asm.js, and the push for browser performance improvements, canvas and WebGL technologies are opening a world of possibilities.  I featured 9 Mind-Blowing Canvas Demos and then took it up a level with 9 Mind-Blowing WebGL Demos, but I want to outdo...

Incredible Demos

  • By
    Using jQuery and MooTools Together

    There's yet another reason to master more than one JavaScript library: you can use some of them together! Since MooTools is prototype-based and jQuery is not, jQuery and MooTools may be used together on the same page. The XHTML and JavaScript jQuery is namespaced so the...

  • By
    Implement the Google AJAX Search API

    Let's be honest...WordPress' search functionality isn't great. Let's be more search functionality is better than Google's. Luckily for us, Google provides an awesome method by which we can use their search for our own site: the Google AJAX Search API.


  1. Geopelia

    Like i child…

  2. danny

    Since aliasing gitwww to open the current github repo’s home page, ive saved prob. 2 mins/day. Plus is saves my fingers a trip to the mouse!

    • Ollie

      could you share how you made the alias dynamic to access the current repo’s homepage?

  3. I thought you’re gonna use lynx :))

  4. open didnt work :(
    but start did :) in windows environment

  5. Heh, you got me there! I thought you wrote an article about lynx :-) Thanks for sharing though, it’s especially useful when grabbing stuff using curl or wget…

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!