Want to open folder or edit file as administrator (aka root in Linux)? Here’s how to do the trick by adding menu option in Ubuntu 22.04 file manager.
The ‘Files’ (aka nautilus) has an extension called
nautilus-admin to do administrative operations. With it, you may right-click on folder and select “Open as Administrator“, or right-click on file and select “Edit as Administrator“.
Don’t like MS Windows, it however does not support running an app as root.
1. Open Terminal
Firstly, open terminal either by pressing Ctrl+Alt+T key combination on keyboard, or by searching from the ‘Activities’ overview screen.
2. Install nautilus-admin
When the terminal opens, paste the command below into it and hit Enter.
sudo apt install nautilus-admin
Type user password (no asterisk feedback) for sudo authentication and hit Enter to continue.
3. Apply change
Once installed the extension, you need to restart the file manager to apply change.
Not just close and re-open the file manager window, but you need to run command to quit the background service and let it start again automatically:
That’s all. Enjoy!