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 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
add comment

migrated from stackoverflow.com Oct 19 '12 at 19:23

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

1 Answer

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
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.