Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

Title says it all. Is there a way to open the default browser on a user's system to a specific page from within a Bash script, or other-language script?

share|improve this question

Best guess is xdg-open it should automatically fall-back to your Desktop environment to determine the browser.

share|improve this answer
Does this then allow the script to terminate, and still execute the command to open the default browser? – Thomas Ward Jul 30 '12 at 17:29
Did you mean "open the URL in background"? You can append & at the end of the command to tell it to execute in the background. For example xdg-open http://unix.stackexchange.com/questions/44311 &. In this case it's unnecessary because xdg-open opens the URL in the background by default. – phunehehe Jul 30 '12 at 17:48

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.