I would like to know if there is a command to open any file in Linux independently of their extension, just as if you were double-clicking it.
2 Answers
There are commands that are similar to the double-click: xdg-open
is a fairly standard command that is shipped with many linux GUIs. On Debian distros, there is also see
and open
.
It would be good to point out that extensions are actually kind of arbitrary. There are so many esoteric extensions out there; no program, including the "double-click" can possibly know how to interpret every file out there.
And if you know the contents of file and the right program to run it, you should be able to execute/use the file regardless of its extension.
-
7
-
2
see
andopen
are specific to Debian and derivatives.xdg-open
is pretty much de facto standard nowadays (it's a Freedesktop standard). Jul 19, 2015 at 21:25
xdg-open THE_FILE