Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

How can I run a file from the command line without the need to specify manually which program is associated with it?

In Windows' CMD.EXE I would just write the file's name, and the associated software will run and try to open it.

share|improve this question
up vote 4 down vote accepted
gnome-open test.png        // For gnome desktops

gvfs-open test.html        // replacing gnome-open these days.

xdg-open test.doc          //

one of these should work.

xdg-open should be preferred, since it's cross-desktop environment.

share|improve this answer
xdg-open should be preferred, since it's cross-desktop environment – evilsoup Mar 25 '13 at 17:42
Yep. I have put the link to it so that he can read it himself. But I think I should mention it here too. – Chrono Mar 25 '13 at 17:45
it is fixed now :) – Chrono Mar 25 '13 at 17:46

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.