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.
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
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.
xdg-openis much more standard than what you suggest. Jul 19, 2015 at 2:45
openare specific to Debian and derivatives.
xdg-openis pretty much de facto standard nowadays (it's a Freedesktop standard). Jul 19, 2015 at 21:25
works like a charm