up vote 3 down vote favorite
share [g+] share [fb]

In a mac cli, I can type open file.jpg and the mac will automatically figure out the correct application and open it for me.

In Windows, the start command does the same thing, but also will open up explorer to working directory if given no parameters.

Is there a way to do that in linux? (maybe only certain distros?)

link|improve this question

feedback

migrated from stackoverflow.com Feb 4 '10 at 19:21

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 5 down vote accepted

If XdgUtils is installed files can be opened via

xdg-open file

Otherwise there might be something provided by the desktop environment, e.g. for gnome

gnome-open file
link|improve this answer
feedback

Try xdg-open. Should be supported by most distros and desktops.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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