Enable Open As Administrator on Ubuntu 16.04 / 17.10 / 18.04

For students and new users, sometimes it’s nice to have the ability to edit file and open folders as root or administrator… You probably don’t want to always use the sudo command via the terminal to edit configuration files.

If you can easily browse to a file via Nautilus or file explorer and edit it using the default editor can be useful especially for students and new users…

For example, if you want to edit Ubuntu hostname file, simple browse to /etc/hostname, then right-click the file and select Edit as Administrator… doing this will allow you to make changes and save those changes with administrative rights…

This brief tutorial is going to show students and new users how to enable Edit / Open As Administrator or root on Ubuntu 16.04 / 17.10 and 18.04.When you’re ready to enable this change, follow the steps below:

Step 1: Install Nautilus Admin Tool

To enable this feature, you must first install Nautilus administrator tool… doing this will allow you to edit file and open folders as administrator..

To install the tool, open Ubuntu terminal or press Ctrl — Alt — T on your keyboard to open the terminal app… then run the commands below

sudo apt install nautilus-admin

After that, open Nautilus file browser and test…

Step 2: Using Nautilus Admin

Now that the tool is installed, all you have to do is open Nautilus file browser, right-click a fileĀ  or folder and select Open As Administrator as shown in the image below…

First run the commands below to reload Nautilus….

sudo nautilus -q

ubuntu open as admin

When you want to edit files, you’ll see Edit as Administrator… on Folders, you’ll get Open as Administrator. Doing that will prompt you to type your password… this only works if your account is already member on the sudo approved list.. if the user opening a file isn’t authorized to use the sudo command, it won’t work…

This is a very useful tool especially if you’re new to Linux and Ubuntu…

Summary:

This post shows students and new users how to easily enable Open as Administrator on Ubuntu desktops… For students this can be a great way to edit basic file configurations without using the command line terminal.

Enjoy!

You may also like the post below:

Change Apache2 HTTP Default Port on Ubuntu 16.04 / 17.10 / 18.04

5 Comments

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.