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

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 Feb 4 '10 at 19:21

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

up vote 8 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

It seems that you can append an ampersand to your line:

Windows :

start "Title" /MIN <application>

Linux :

<application> &

As a result, you'll see the process ID of the application and in the terminal window where you're located, you'll see the output of the application.

share|improve this answer
This suggestion will start a program running in the background. I was interested in taking any file (not just executables) and having the OS automatically find the default program associated with that file, and then have that program start it for me. For example, in Windows I can type start file.jpg and it will find the image viewer program and open the file for me. – Alexander Bird May 4 at 20:31

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.