Use the command line in Ubuntu to quickly open various types of files

Source: Internet
Author: User


In Ubuntu, use the command line to quickly open various types of files. In Ubuntu, when you need to open files in other formats, we usually go to the directory where the files are located. Double-click to open the files, which affects efficiency. In fact, you can use the xdg-open command to open these format files, or even web pages, as simple as opening a file. In Ubuntu, you can use command lines to open text files, such as gedit, more, cat, vim, and less. However, when you need to open other format files, such as pdf, jpg, and mp3 files, we usually go to the directory where the files are located and double-click to open them, which affects efficiency. In fact, you can run the xdg-open (opens a file or URL in the user's preferred application) command to open these format files, or even webpages, as easy as opening a file. Www.2cto.com: jelline @ jelline :~ $ Xdg-open la_isla_bonita.mp3 jelline @ jelline :~ $ Xdg-open http://baidu.comjelline @ jelline :~ $ A new window has been created in an existing browser session.
Xdg-open selects an appropriate program to open the specified file, which is the same as double-clicking to open the file. In my computer, the first example will be opened with Totem Movie Player, and the second example will be opened with Google browser instead of Firefox, because Google browser is my default browser. The specific operations on www.2cto.com are as follows: xdg-open {file | URL} xdg-open {-- help | -- manual | -- version} OK. Is it much easier now, the shell can be opened through the shortcut key Ctrl + Alt + T, and F11 can be displayed in full screen (Alt + F9 minimization window, Alt + F10 maximization/restoration window), supplemented by the xdg-open command, greatly reduces mouse operations and greatly improves efficiency.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.