# Terminal question

**URL:** <https://forum.endeavouros.com/t/terminal-question/23911>\
**Category:** General system\
**Created:** [February 10, 2022, 9:46am UTC](https://forum.endeavouros.com/t/terminal-question/23911 "2022-02-10T09:46:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![flyingcakes](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/flyingcakes/32/6218_2.png) [@flyingcakes](https://forum.endeavouros.com/u/flyingcakes)\
**Post date:** [February 10, 2022, 10:22am UTC](https://forum.endeavouros.com/t/terminal-question/23911/4 "2022-02-10T10:22:01Z")

</div>

`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.

> [@Terminal question](https://forum.endeavouros.com/t/terminal-question/23911/2):
>
> Don’t you need a pdf-viewer to view a pdf file? For example $ evince name-of-the-file.pdf

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

Eg

```sh
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`.

```sh
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`.

```auto
nohup xdg-open ~/Desktop

```

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

---

_[View the full topic](https://forum.endeavouros.com/t/terminal-question/23911)._
