This guide explains how to add an Open as Administrator right-click option to GNOME Files (Nautilus) on Ubuntu and other supported Debian-based Linux systems. The nautilus-admin extension adds administrative actions for supported files and folders. Use root access only when necessary: changing system files can affect the whole operating system, and the extension is not intended for every Linux file manager.
Note: These steps are for GNOME Files (Nautilus) on Ubuntu or a compatible Debian-based distribution. You must have an account with working administrator privileges. On Ubuntu, nautilus-admin is provided in the Universe component; if APT cannot find the package, check that the appropriate repository component is enabled for your release. The package is also available in Debian repositories. See the Ubuntu package listing for supported releases.
Security Warning: Running files or editing system files as root can be dangerous. It is important to be cautious while using this feature, as making unintended changes to system files could render your system unstable or cause irreparable damage. Always double check the files you are working with and make backups of critical files before making changes.
Add a menu to Right Click Open Files as Root
To add a contextual menu item that enables you to Open files as Root or Administrator with a simple right mouse click:
- Open the Terminal Ctrl + Alt + T

- Refresh the package list:
sudo apt update - Install the Nautilus Admin extension:
sudo apt install nautilus-adminReview the packages APT proposes to install, then confirm when prompted.
- Restart Nautilus so it loads the extension:
nautilus -qIf the file manager does not reopen automatically, open Files again from your applications menu.
Right Click Open Files as Administrator
After restarting Files, right-click a supported folder and select Open as Administrator. For supported text files, the extension may also offer Edit as Administrator. The exact menu options can vary with the installed Nautilus version and associated applications.
Pro Tip: If the file manager was already open while you installed nautilus-admin, you'll need to close and reopen it to see the changes. If that doesn't work, simply log off and then log back in to see the changes!


You now also have the option to edit files as Administrator using a right-click.

Troubleshooting
In case the context menu doesn't appear or you face issues after installation, here are some tips:
- Missing Menu Option: If the "Open as Administrator" option doesn't show up, try restarting your file manager by typing nautilus -q in the terminal or simply log off and log back in.
- File Permissions: Be careful when opening files as root. If you accidentally modify critical system files, it can lead to instability or issues with your system. Make sure you know what you're modifying.
Alternative File Managers
This extension is specifically for Nautilus and does not add menu items to Thunar, Dolphin, or other file managers. Their administrative workflows differ by desktop environment and version. In particular, thunar-archive-plugin is an archive-management plugin, not a tool for opening files as root. Check the documentation for your file manager before installing an extension.
Alternatives to Context Menu Editing
For editing a single system configuration file, prefer a terminal editor launched with sudoedit when practical, for example sudoedit /etc/hosts. This avoids running an entire file manager as root. Older advice to use gksudo may no longer apply on current distributions, and pkexec is not a universal drop-in replacement for launching graphical file managers.
Further Reading
If you are new to using the sudo command or managing file permissions in Linux, it's a good idea to familiarize yourself with some basic concepts. Here are a few resources you can explore:
Final Thoughts
The nautilus-admin extension adds an Open as Administrator option to GNOME Files on supported Ubuntu and Debian-based systems. Install it with APT, restart Nautilus, and use the context menu only for tasks that genuinely require elevated privileges. For a single configuration file, sudoedit is often a more limited alternative. Other file managers require their own supported methods.