Skip to content
Related Articles

Related Articles

xdg-open command in Linux with Examples
  • Difficulty Level : Easy
  • Last Updated : 24 May, 2019

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :