Open a website in a browser from commandline

My attempt to open a website in command prompt or a batch file.

I found that, for Windows, I could run


In batch script, I can do:

start explorer

Ps. Actually, I don’t really have to use start 🙂

In Linux, we should be able to run


(if there is Firefox)

Java JDK 6 also supports it using Browse class:


5 Responses to Open a website in a browser from commandline

  1. zproxy says:

    You can use explorer to choose the default browser:

    start “web” explorer “http://localhost:8080”

  2. iki says:

    Start.exe itself can open the right application associated with given file type or url type, ie. default browser for http. This works:

    start “” “”

  3. iki says:

    Also the empty quotes “” are only needed if the file/url argument needs to be quoted, because start.exe considers the first argument a title of the new window (when possible, ie. ignored by most apps) if it is quoted. So if you do not need quoting the file/url, you can skip the empty title too:


    On linux, you can use xdg-open:


  4. Vo Duc Dien says:

    I’ve downloaded the software that does exactly this. From a command line open several websites without having to copy, paste VB scripts, batch files, etc… It’s at

  5. You’re so interesting! I do not think I have read anything
    like this before. So nice to find somebody with some
    original thoughts on this subject matter. Really..

    many thanks for starting this up. This web site is something that is required on the internet, someone with a
    bit of originality!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: