Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

Is there are way to use the MacOS command open to open files with their default applications like e.g. open mytext.pdf or open Can Ubuntu be extended in this way?

share|improve this question
up vote 2 down vote accepted

Try xdg-open <your-file>.

   xdg-open opens a file or URL in the user's preferred application. If a
   URL is provided the URL will be opened in the user's preferred web
   browser. If a file is provided the file will be opened in the preferred
   application for files of that type. xdg-open supports file, ftp, http
   and https URLs.
share|improve this answer
Thanks! Exactly what is was looking for! – joachim Jun 5 '12 at 14:39

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.