Register for your free TechRepublic membership or if you are already a member, sign in using your preferred method below.
We recently updated our Terms and Conditions for TechRepublic Premium. By clicking continue, you agree to these updated terms.
Invalid email/username and password combination supplied.
An email has been sent to you with instructions on how to reset your password.
By registering, you agree to the Terms of Use and acknowledge the data practices outlined in the Privacy Policy.
You will also receive a complimentary subscription to TechRepublic’s News and Special Offers newsletter and the Top Story of the Day newsletter. You may unsubscribe from these newsletters at any time.
All fields are required. Username must be unique. Password must be a minimum of 6 characters and have any 3 of the 4 items: a number (0 through 9), a special character (such as !, $, #, %), an uppercase character (A through Z) or a lowercase (a through z) character (no spaces).
How to easily open files with sudo privileges in the GNOME File Manager
Your email has been sent
If you’re tired of having to jump through hoops to open files with sudo privileges in the GNOME File Manager, Jack Wallen has just the trick you need.
Not all Linux file managers are created equal. Some file managers have more bells and whistles than the average user will ever need, while other file managers are as inflexible as cold, hard steel. There are also those that ship with a bare minimum of features but allow users to extend the feature set with add-ons.
Given how we so often take the file manager for granted, once you find a feature that could really make your daily life a bit more efficient, you realize just how important the tool is. Such is the case with the GNOME File Manager. Out of the box, it works great and includes enough features to get you by for a while. Eventually, however, you’ll find some features that could make things a bit easier.
One such feature is the ability to open files with sudo privilege without having to jump through extra hoops.
Let me set the stage for you. As it ships, to open a file with sudo privileges, you have to do the following:
That’s a bit extra. And when you’re having to do this over and over throughout the day, it can become a serious waste of time.
SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)
Fortunately, there’s a way to add an Edit as Administrator entry to the Files right-click context menu, so you don’t have to go through all of those steps. The one caveat to this is that if you’re opening text files, it will open in the default Gedit — or GNOME Text, depending on which version of GNOME you’re using — GUI application.
If you prefer editing such files in the terminal window, the more cumbersome route is still your best bet. But for those who want more efficiency out of their file manager, let’s fix this glaring omission.
The only things you’ll need to make this work are a running instance of any Debian-based Linux distribution that uses the GNOME file manager and a user with sudo privileges. The one caveat to this is that there is no way to do this on an RHEL-based distribution such as Fedora without using a tool like beesu, which allows you to open the file manager with sudo privileges and doesn’t make the process any more efficient.
With that said, let’s get this up and running on my go-to Linux distribution, Pop!_OS.
Before we add this extension, please use it with caution. Once you’ve installed this tool, you make it easier for other people to open important configuration files with ease. Do this only if you trust those who’ll be using your desktop.
With that out of the way, log in to your desktop and open a terminal. From that window, issue the command:sudo apt-get install nautilus-admin -y
Once the installation completes, restart Nautilus with the command:nautilus -q
Open Nautilus and navigate to a file you want to open that requires root access, such as /etc/samba/smb.conf. Right-click that file and you should now see a new entry in the Nautilus aka GNOME Files context menu, named Edit As Administrator (Figure A).
Figure A
After typing your user’s sudo password, the Gedit — or whatever GUI text editor you’ve set as your default — will open the file with write permissions. Edit the file as needed, save it and you’re done.
Thanks to this handy addition to the GNOME File Manager, your work day can be made considerably easier. Give nautilus-admin a try and see if you don’t quickly come to depend on the newly-added feature.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.
From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know.
How to easily open files with sudo privileges in the GNOME File Manager
Your email has been sent
Your message has been sent
TechRepublic Premium content helps you solve your toughest IT issues and jump-start your career or next project.
Windows 11 gets an annual update on September 20 plus monthly extra features. In enterprises, IT can choose when to roll those out.
Edge AI offers opportunities for multiple applications. See what organizations are doing to incorporate it today and going forward.
This is a complete guide for Apple’s iPadOS. Find out more about iPadOS 16, supported devices, release dates and key features with our cheat sheet.
Discover data intelligence solutions for big data processing and automation. Read more to explore your options.
Whether you are a Microsoft Excel beginner or an advanced user, you’ll benefit from these step-by-step tutorials.
Edge computing is an architecture intended to reduce latency and open up new applications. The terms around it can be fluid, but are helpful to know. From the glossary’s introduction: Edge computing is an architecture which delivers computing capabilities near the site where the data is used or near a data source. In an idealized …
This document helps make sure that you address data governance practices for an efficient, comprehensive approach to data management. This checklist from TechRepublic Premium includes: an introduction to data governance, a data governance checklist and how to manage a data governance checklist. From this checklist’s introduction: Data governance is the process by which an organization …
Recruiting a Scrum Master with the right combination of technical expertise and experience will require a comprehensive screening process. This hiring kit provides a customizable framework your business can use to find, recruit and ultimately hire the right person for the job. This hiring kit from TechRepublic Premium includes a job description, sample interview questions …
Knowing the terminology associated with Web 3.0 is going to be vital to every IT administrator, developer, network engineer, manager and decision maker in business. This quick glossary will introduce and explain concepts and terms vital to understanding Web 3.0 and the technology that drives and supports it.