Terminal question

open is a MacOS command. It shouldn’t work on Linux distros (at least not without a plugin/ script)

To open files via a Linux terminal, you write name of application followed by the filename.

Of course, the application should be capable of opening given file/directory.

Eg

thunar ~/Desktop
mpv video.mp4
feh picture.png
zathura document.pdf
firefox endeavouros.com

… and so on. You can use any other application you like.

Also, as @Zircon34 mentions in last post, you either enclose filename/ filepath in quotes ( evince "~/my file name.pdf" ) or prefix spaces with \ . ( evince ~/my\ file\ name.pdf ).


Talking about open, the closest you can get on Linux without third party stuff is xdg-open. It is used pretty much the same way as open.

xdg-open ~/Desktop
xdg-open video.mp4
xdg-open picture.png
xdg-open document.pdf
xdg-open endeavouros.com

I’m not sure if open detaches process from terminal or not. xdg-open does not do that. You can achieve that using nohup.

nohup xdg-open ~/Desktop

Now, even if you close the terminal, your file manager won’t close.

4 Likes