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.

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?)

share|improve this question

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

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

2 Answers 2

up vote 7 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
share|improve this answer

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

share|improve this answer

Your Answer

 
discard

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.