I'm new to linux and the terminal. As I learn how to use the terminal to navigate through directories, I like to use the gui file explorer to mirror my terminal navigation. The icons and file extension info in the gui file explorer help me figure out what everything is. However, I can't access the root folder via the gui, I can only access it via the terminal. Is there a way to enable access to the root folder outside of the terminal?
5 Answers
Try one of the below commands,
gksu nautilus
or
sudo -i nautilus
It is an GUI way of navigating through directories with root access.
-
According to this link, gksu and sudo are about the same: unix.stackexchange.com/questions/66479/… Feb 19, 2014 at 5:01
-
@DanJohansen Sure they are not when dealing with GUI. Read the answer in link above and you will understand why and note that we are Ubuntu so i recommend you just to link to askubuntu answers when you want to do that– MaythuxFeb 19, 2014 at 5:03
-
1@maythux It is obvious that he should never use sudo rights with a GUI application, but it is what he was asking for to do. he can seriously mess up his system by doing so, I know, but that doesn't make my statement false, that gksu is a wrapper for sudo, therefore almost the same. Feb 19, 2014 at 5:07
-
@maythux the answer Dan linked links backs to us askubuntu.com/a/11831/169736 which essentially says the same. gksu/do is just a wrapper for sudo– BraiamFeb 19, 2014 at 5:38
-
1@maythux in that case tell that to OP who's asking, don't start a discussion where the answer clearly tells how could be done, when your own don't even include a warning about the dangers of using nautilus (or any file manager) as root.– BraiamFeb 19, 2014 at 5:48
Open terminal and type
sudo nautilus
Enter your password and voila it works.
-
THAT'S IT! It didn't even ask for my password. It just worked. Now if I only knew how to make it an icon. Thank you from August 2017.– SDsolarAug 14, 2017 at 18:46
From terminal so from terminal you can do it with the command
gksu nautilus
This will prompt you to password. Enter your sudoer user password and this will open the root home directory.
If you want to open a specific path as root
gksu nautilus /path-you-want
EDIT: You can also install Open-as-Administrator in Ubuntu open Terminal (Press Ctrl+Alt+T) and copy the following commands in the terminal:
sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install open-as-administrator
After installation type this command to restart Nautilus:
nautilus -q
and now you can open any directory with root permissions
-
That installation threw a ton of errors and never opened, in Ubuntu 16.04 (August 2017) - even the remove command threw up all over the screen. Plus then I had to delete that respository. NOT RECOMMENDED TO DO THIS -------> the simplest solution is to simply type
sudo nautilus
in terminal. It just plain works.– SDsolarAug 14, 2017 at 18:48
The simplest one I know is,
killall nautilus; sudo nautilus
When you have decided to damage your files, all that I can do is either watch the fun or make things even worse by helping you.
-
what is the harm by just navigating through root folder? and why you want to kill nautilus.
sudo nautilus
will open a different window with root access. Feb 19, 2014 at 7:50 -
without root permission, one can't make a permanent damage to OS.using root, one can make it unbootable.I used
killall nautilus
because there is not much sense in loading twonautilus
when you can use tabs.It's personal choice anyway. Feb 20, 2014 at 10:57
In terminal type "gksu nautilus".
(the gksu command can be used instead of sudo when wishing to run gui apps as root, though you should be cautious about what apps you run as root).
or
In terminal type "sudo -i" then "nautilus".
(works, but you will recieve some errors, and it's not a good idea as gui applications should use gksu)
or
In terminal type "sudo nautilus".
(works, but you will recieve some errors, and it's not a good idea as gui applications should use gksu)
sudo nautilus
.