By default, the File Manager in Ubuntu or in any other Linux distro uses a non-root user. I mean a user that doesn’t have Administrative rights can access them graphically. It improves overall system security. However, if you want to run File manager as the root user or want to open & edit files and folder with administrative rights that are possible as well. However, you have to use the command terminal to enable that. The following tutorial carried out on Ubuntu 20.04 LTS focal fossa. However, the steps will be the same for earlier versions such as Ubuntu 19.10/19.04; 18.10/18.04 including Debian, Linux Mint, or any similar OS running Nautilus File manager.
Open Ubuntu Nautilus File Manager as root
- Open command terminal either from Applications or using keyboard shortcut- Ctrl+Alt+T.
- Run Nautilus file manager with sudo. Here is the syntax:
- It will ask for your current non-root user’s password that is present in the sudo group.
- Ubuntu File manager will open under administrative rights. Now you can navigate to any folder and files that can only be accessed by the root user via the graphical user interface.
Edit or Open Ubuntu Files and Folders as root Administrative
If you want to edit any file or open folder as root user directly from the Nautilus file manager’s graphical user interface. Then, we can embed an option “Edit as Administrator” or “Open as Administrator” privileges in its contextual menu.
- Again open command terminal, if you already have not.
- Install the Nautilus Admin package.
sudo apt install nautilus-admin
- Enter the current user password and press the Y key to accept the packages for downloading and installing.
- Restart Nautilus File manager instances.
sudo nautilus -q
- Type exit and hit the Enter key to close the Terminal window.
- Now, to edit any file as the root user, open file manager, or right-click on that particular wherever it resides. And select the option “Edit as Administrator”.
- To open folders as root, same just like above right click on that and select “Open as Administrator’.
Warning: Running File Manager as Admin
Although, the above tutorial is useful in case you are not a well-experienced command terminal user, however, be cautious. Make sure you wouldn’t alter or edit some core configuration files that could leave your Ubuntu unstable or un-bootable.
1 thought on “How to open Ubuntu file manager as root user”
Thanks for the post. I am a fervent Linux user, but not proficient with the command line. Your instructions to open the file manager worked well with Linux Mint 20, changing the file manager name to “nautilus” to “Caja”. Now I can use a complete disk partition, made in a former installation, changing the permissions.