Maxim Kholyavkin
Maxim Kholyavkin

Reputation: 4573

how to run file associated application from console linux

on windows exist command:

start myfile.mp3
start myfile.txt

on mac:

open myfile.mp3
open myfile.txt

Are there analogue command under Ubuntu?

Upvotes: 3

Views: 1012

Answers (3)

fmmarques
fmmarques

Reputation: 301

Try "gnome-open", for Gnome powered distros.

gnome-open random-file.torrent will open my torrent app.

Upvotes: 0

tripleee
tripleee

Reputation: 189387

xdg-open if you have a freedesktop.org-compatible environment.

Upvotes: 9

Xander
Xander

Reputation: 1715

There are several commands in Linux that help you open application associated files. If you know the application to open the file, then this may work . I am not sure if you are looking for this

env DISPLAY=:0.0 firefox "google.com" opens Firefox with google.com opened in it. You can replace the application name and file name and use this command.

Upvotes: 0

Related Questions