Open In App

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:

Article Tags :