Working in the terminal is fine, but sometimes you’re browsing folders in Nautilus and you just want to right-click a config file and open it as root without typing commands. There used to be a package called nautilus-gksu for this, but it was deprecated years ago and removed from modern Ubuntu releases.
Here’s how to do it now.
Option 1: nautilus-admin (recommended)
The modern replacement is nautilus-admin, a Nautilus Python extension that adds “Open as Administrator” and “Edit as Administrator” to the right-click menu:
sudo apt install nautilus-admin
After installing, restart Nautilus:
nautilus -q
Now right-click any file or folder and you’ll see “Open as Administrator” in the menu. It’ll prompt for your password via pkexec and open a Nautilus window with root privileges.
Option 2: Use the admin:// URI
If you prefer not to install anything, you can type this directly into Nautilus’s location bar:
admin:///path/to/folder
Nautilus will prompt for your password and show the specified folder with root access. It’s not integrated into the right-click menu, but it works without any extra packages.
Enjoy!
Do you people have a facebook fan page? I looked for one on twitter but could not discover one, I would really like to become a fan!
No Facebook but there is a Twitter page.
You can find the link at the top of the sidebar.
Thanks!
Great information! I’ve been looking for something like this for a while now. Thanks!
thanks