How To Open A Directory with Root Privileges In Ubuntu 20.04 LTS?

How To Open A Directory with Root Privileges In Ubuntu 20.04 LTS?

 
 

In Linux or Unix, you can perform almost any task by using a terminal. You need to have superuser privileges to perform tasks such as installation or removal of softwares, editing configuration files, etc.

Linux provides sudo command, to execute a command in privileged mode. Many users prefer to use GUI for some tasks, especially new users. Now suppose you want to move a file or folder that needs root permissions, how will you do that? By using the terminal you can do it easily.

If you are using GUI, some Debian based distributions such as Linux Mint; provide an option to open as root. In Ubuntu 20.04 and its some previous versions this option is disabled by default. In this article, we will discuss to enable this option in Ubuntu 20.04 LTS.

Nautilus

Nautilus is an official file manager for gnome desktops. It allows one to browse directories and open an application associated with them. It is also responsible for icon handling in gnome desktops. In Ubuntu, prior to version 17.10, you could use gksu or gksudo command to open the Nautilus file manager as root, then you can access a file or directory with the root permissions. To enable this option in later versions of Ubuntu including Ubuntu 20.04 or 18.04 you can follow the below steps.

Installing the nautilus admin tool

To enable open as administrator or root option, first, you need to install nautilus administrator tools in your system. To install this tool open terminal by pressing ctrl+alt+t and then execute the following commands in it-

First, update the apt package index –

sudo apt update

And then use –

sudo apt install nautilus-admin

Press y if ask for confirmation. Once it gets installed reload the file manager with the following command.

nautilus -q

Using nautilus admin tool

Now nautilus administrator tool is installed in your system. When you right-click on a folder you will see an option to open it as administrator which means you can open a file or folder as an administrator or with root privileges. Look at the image below –

Once you click on open as administrator option it will prompt you for authentication as given in the image below. Enter your password and click on authenticate. This will open the directory with root permissions.

Conclusion

Be careful while using nautilus as an administrator you may end up with editing a system file which can make your system unusable. So use this tool only when it is needed.

Ok, that’s all for now. If you want to say something on this topic, you can share your thoughts with us in the comments below.

Previous How To Install Apache Tomcat In Ubuntu 20.04 LTS?
Next How To List The All Enabled Repositories In Linux?

About author

You might also like

Uncategorized 0 Comments

How To Count Words, Lines, of A File with wc command In Linux/Unix?

While working with files especially with text files sometimes you may need to count the number of words, number of lines, total character, etc. Linux/Unix provides wc command which is

Uncategorized 0 Comments

How To Install Or Remove A Package With Synaptic Package Manager In Ubuntu/Linux Mint?

Synaptic is a GTK-based GUI program. It is used as a frontend for the APT package manager. Generally, it is used for debian based Linux distributions but can be also

Uncategorized 0 Comments

How To Setup FTP Server In Ubuntu 20.04 LTS?

FTP or File Transfer Protocol is a standard networking protocol used to transfer files between client and server. An FTP user may authenticate themselves by using username and a password.

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply