How to open a file manager of the current directory in the terminal?
Solution 1
The following works in all desktop environments by using the default file manager:
xdg-open .
You can also open files from the terminal as if you had double clicked them in the file manager:
xdg-open file
Solution 2
Problem
This tip will explain How to open a file manager of the current directory in the terminal
Solution 1
The following works in all desktop environments by using the default file manager:
xdg-open .
Solution 2
You can also open files from the terminal as if you had double clicked them in the file manager:
xdg-open file
Solution 3
If you are using Gnome, you can use the gnome-open command, like so:
gnome-open .
Solution 4
You can use nautilus [path]. for current directory -
nautilus .
Solution 3
You write nautilus [path]. for current directory -
nautilus .
Solution 4
In Ubuntu 20.04, you can just say browse .
to open the current directory
Solution 5
If you are using GNOME, you can use the gnome-open
command, like so:
gnome-open .
Related videos on Youtube
dv3500ea
I am an Ubuntu user (since Jaunty) and also a programmer (by hobby - no formal education). I found the community on Ubuntu Forums extremely helpful and so started to return the favour and never stopped :) I am currently involved with the development of the following FOSS projects: DMedia - a distributed media library, to be used by the Novacut video editor. (IRC: #novacut) QR Tools - tools for creating and reading QR codes. Both of these projects actively welcome new contributors so feel free to help out. If you are interested but don't know where to start feel free to contact me. If you find my answers helpful, and you have money to waste spare, you may donate to me via: flattr Bitcoin - 14wAQSJT4F1QsUUdUVvZS5TXmgvCyNr1ET youtipit
Updated on September 17, 2022Comments
-
dv3500ea over 1 year
When I work in terminal, sometimes I want to open the current directory in a GUI file manager. And then to click the items in the window to run the application. How can I do this?
-
dv3500ea about 13 yearsI don't think this question is an exact duplicate. There are many similar questions with some identical answers but none of the questions have the exact same focus as this question. The closest question is How to open a directory/folder and a URL through Terminal
-
CypherX over 2 yearsTried all the answers below. The ones that worked on Ubuntu 20.04 are:
xdg-open .
,nautilus .
,browse .
. Butgnome-open .
did not work as-is (I guess either gnome is not installed or there's some other reason for that). Nonethless, this is to confirm what worked as of 01-Feb-2022.
-
-
vidur punj almost 8 yearsTo use it first install: sudo apt install libgnome2-bin
-
WesternGun over 7 yearsThis is the most complete one and should be the answer. Works in RedHat 7.2 x64.
-
The Godfather almost 7 yearsDoesn't work for Ubuntu 16
-
The Godfather almost 7 yearsI wonder why isn't there common command for opening whatever the GUI is. I have tried all commands from above answers and no one worked for me. This is the only working on Ubuntu
-
Tim about 6 yearsIs there a way to open gnome as sudo? I tried
sudo gnome-open .
with no luck. -
рüффп over 5 yearsWorks in CentOS 6.10 as well.
-
gdaras over 5 yearsThis has the disadvantage that you have to keep terminal window alive while you are navigating. If you kill the window, the file explorer gets killed too.
-
Vladislav Rastrusny about 5 yearsThis is easily solved by adding
&
to the end like this:nautilus . &
-
Nino Filiu about 5 years@TheGodfather it works it Ubuntu 18.04
-
danilo almost 5 yearsfor ubuntu, uses:
caja
, ornautilus
-
cbloss793 almost 5 yearsWorks like a charm in Ubuntu 18. :) Thanks for this!
-
Drazen Cika over 4 yearsWorks for me in Ubuntu 16.04
-
Jules Colle over 4 yearsThis is easier to remember for me.
-
vulpxn almost 4 yearsThis shows a deprecation warning, the newer command is
gio open .
(Centos 7) -
Asocia about 3 years
browse
is just a symlink toxdg-open
. So you can use both of them in the same way. (i.e you can also open files withbrowse
) -
zean_7 almost 3 yearsIs there a similar command to "Choose a file"? e.g. It will open the default file manager and you can choose/select a file and it'll return the file's absolute path? More like a "File-picker"?