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 .
Thank to adam for this tip
Excellent tip.
May I suggest adding an alias as follows, and place it in .bash_aliases:
alias naut=’xdg-open $PWD’
Kind Regards
Baz
Great tip! For too long I was cd’ing to a folder then opening my file manager to run the default app for a rarely encountered file type.
$ nautilus .
..is not good as it will use the absolute path.
$ nautilus `pwd`
..works, but only if there is no spaces in the path.
$ nautilus “`pwd`”
..works with spaces as well.
example of alias:
alias nau=’nautilus “`pwd`”‘
Thunar also works under Xubuntu I discovered.
KDE users: dolphin or konqueror work as file managers. The xdg-open examples listed above will work just fine but you might prefer to use the one that is not the default.
Konquorer requires the directory or filename, so you need to use the . character.
Dolphin doesn’t need to have any parameters and just typing the name is enough for it to open the current directory.
I cannot see a reason that one would need the pwd examples because both seem to handle directories just fine.
Also note, tab complete is your friend: typing dol is faster than typing xdg-o but just a tad. Where is really comes in handy is for file names (especially ones with spaces).