Linux: Open File Manager From Terminal

While working in a Linux terminal, sometimes you may want to open the current directory in a GUI file manager and continue working from there.

There are many different file managers in Linux, but there is also a universal way to open the default file manager from the terminal using the xdg-open command.

This note shows how to open the file manager from the terminal in Linux.

Open File Manager From Linux Terminal

Use the following command to open the current directory in the default GUI file manager from the Linux terminal:

$ xdg-open .

To specify the path to a folder to open in the file manager from the Linux terminal, execute:

$ xdg-open ~/Downloads/

You can also use the xdg-open command to open files or URLs in the user’s preferred applications, for example:

$ xdg-open photo.jpg
$ xdg-open doc.pdf
$ xdg-open https://www.shellhacks.com
Was it useful? Share this post with the world!

Leave a Reply