21

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?

3

5 Answers 5

34

Try one of the below commands,

gksu nautilus

or

sudo -i nautilus

It is an GUI way of navigating through directories with root access.

10
  • 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
    – Maythux
    Feb 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
    – Braiam
    Feb 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.
    – Braiam
    Feb 19, 2014 at 5:48
6

Open terminal and type

sudo nautilus

Enter your password and voila it works.

1
  • 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.
    – SDsolar
    Aug 14, 2017 at 18:46
1

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

enter image description here

and now you can open any directory with root permissions

source

1
  • 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.
    – SDsolar
    Aug 14, 2017 at 18:48
1

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.

2
  • 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.
    – sourav c.
    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 two nautilus when you can use tabs.It's personal choice anyway. Feb 20, 2014 at 10:57
0

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)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .