← All commands
Topic hub Terminal & Shell Scripting
Windows Linux Terminal & Shell Scripting Terminal

Windows start (open file/URL) equivalent in Linux

Opens a file, folder, or URL with the appropriate default application — like double-clicking in the file manager.

Windows start (open file/URL)
Linux equivalents
Debian/Ubuntu same command
xdg-open
Fedora same command
xdg-open
Arch same command
xdg-open

Overview

What this command does

Opens a file, folder, or URL with the appropriate default application — like double-clicking in the file manager.

Migration tip: xdg-open works on any Linux desktop. It respects your default app settings. Works great for opening PDFs, images, URLs, and folders from the terminal.

Practical tasks

Common use cases

Open files with default application

Opens a file, folder, or URL with the appropriate default application — like double-clicking in the file manager.

xdg-open file.pdf

Open PDF in default viewer

xdg-open .

Open current directory in file manager

xdg-open https://url

Open URL in default browser

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

xdg-open document.pdf
xdg-open .
xdg-open https://google.com
xdg-open photo.jpg

Walkthrough

Examples with explanations

# Windows: start file.pdf
xdg-open document.pdf       # open in default PDF viewer
xdg-open .                  # open current folder in Nautilus/Dolphin
xdg-open https://google.com # open in Firefox/Chrome
xdg-open photo.jpg          # open in image viewer

Reference

Common options and variations

Command or optionUse
xdg-open file.pdfOpen PDF in default viewer
xdg-open .Open current directory in file manager
xdg-open https://urlOpen URL in default browser
xdg-open image.pngOpen image in viewer

Distro differences

Debian/Ubuntu vs Fedora vs Arch

This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command xdg-open Same command on this distribution.
Fedora same command xdg-open Same command on this distribution.
Arch same command xdg-open Same command on this distribution.

Keep learning

Related Terminal & Shell Scripting commands