Is it possible to somehow use the xdg-open command to open my home page (google.com) without having to type the url.

What i mean to say is, can i customize

xdg-open http://www.google.com 

to something like:

xdg-open myhome

to open it?

  • Why not just run firefox, or google-chrome, or whatever browser you want to open? – Eric Carvalho Jul 24 '13 at 13:06
  • @EricCarvalho: i feel its much easier this way. The answer below is useful. Just typing "myhome" in the command line is much easier than switching to GUI and then opening it. – naka Jul 24 '13 at 13:11

You could create an alias for your shell. Add this to your .bashrc (assuming you use bash):

alias myhome='xdg-open http://www.google.com'

Then call it with myhome

Or define it as a variable (in .bashrc):


And call with xdg-open $myhome

Though as mentioned in the comments, if google.com is the start page in your browser just call your browser from the command-line, f.ex.:

google-chrome &
firefox &

You probably want the & at the end to open it in the background.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.