Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 Windows command prompt, you can directly type a file name and based on its extension the system launch corresponding applications. For example, C:> foto.jpg (Enter) or C:> doc.pdf (Enter). I wonder if there are similar settings in Ubuntu such as xterm. Thanks.

share|improve this question

migrated from Oct 19 '12 at 19:23

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

up vote 3 down vote accepted

You can use xdg-open:

$ xdg-open doc.pdf &

It will open the file (or URL) you specify with your preferred application.

share|improve this answer

You must log in to answer this question.

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