In Nautilus on Ubuntu, you can see all the files and folders on your system. Sometimes you might want to edit basic file configurations like settings for programs. But there are some system files and folders that you can’t open and edit from Nautilus unless you open Nautilus as Administrator.
Prior to Ubuntu 17.10, you could use the gksu or gksudo command to open Nautilus as Administrator and then open files and folders as administrator from within that Nautilus window. However, these two commands have been removed from Ubuntu. So, how do you open files and folders as Administrator in Ubuntu 17.10 and 18.04?
Today we’ll show you how to add two options to the right-click menu that will allow you to open folders and edit files as administrator.
Add Nautilus Admin to the Nautilus Right-Click Menu
To add options for opening files and folders as Administrator to the right-click menu, we’re going to install Nautilus Admin.
Press Ctrl + Alt + T to open a Terminal window. Then, type the following command and press Enter.
sudo apt-get install nautilus-admin
Enter your password when prompted.
When you’re asked if you want to continue, type a “y” (lowercase or uppercase) and press Enter.
Once the installation finishes, you must restart Nautilus. Type the following command and press Enter.
To close the Terminal window, either type “exit” at the prompt and press Enter or click the X button in the upper-right corner of the window.
Open Files and Folders as Administrator
To open a folder in Nautilus with administrator, or root, privileges, right-click on the folder and select Open as Administrator.
A new Nautilus window opens with administrator privileges and the folder you selected opens.
To edit a file with administrator privileges from within Nautilus, right-click on the file and select Edit as Administrator.
For example, a common use for this option is to open text files in gedit with administrator privileges.
Use Administrator Privileges with Caution
Do you run Nautilus as Administrator and open files and folders with administrator privileges? If so, be careful. Don’t edit system files if you can avoid it. You could end up with an unusable system.
Share your experiences and thoughts with us in the comments!