xdg-open command in Linux with Examples
xdg-open command in the Linux system is used to open a file or URL in the user’s preferred application.
The URL will be opened in the user’s preferred web browser if a URL is provided. The file will be opened in the preferred application for files of that type if a file is provided. xdg-open supports ftp, file, https and http URLs. This can be used inside a desktop session only. It is not recommended to use xdg-open as root. Here, the zero is an indication of success while non-zero show the failure.
Syntax:
xdg-open {file | URL}
Example:
xdg-open read.html
Options:
- xdg-open –version : This option will show the xdg-utils version information.
xdg-open --version
- xdg-open –help: This option will show command synopsis.
xdg-open --help
- xdg-open –manual: This option will show the manual page.
xdg-open --manual
Recommended Posts:
- man command in Linux with Examples
- apt-get command in Linux with Examples
- last command in Linux with Examples
- Cat command in Linux with examples
- until command in Linux with Examples
- sum command in Linux with Examples
- gdb command in Linux with examples
- cvs command in Linux with Examples
- df command in Linux with Examples
- wc command in Linux with examples
- pwd command in Linux with Examples
- du command in Linux with examples
- w command in Linux with Examples
- env command in Linux with Examples
- ed command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.








