Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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          // https://wiki.archlinux.org/index.php/Xdg-open

one of these should work.

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

share
    
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

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .