Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

How to open terminal always with sudo privileges

Writer Andrew Mclaughlin

I am wondering is there anyway to open terminal always with sudo privileges. And is there a way to open specific file with sudo privileges like windows have "run as administrator".

5

1 Answer

To always open a terminal as root is not a good idea, but, hey, it is your computer and we hope you will act responsibly.

Edit your .bashrc file and add sudo -i to the end. Then, anytime you launch the terminal, it will always start with the prompt for the [sudo] password, and drop you to a prompt with root privileges when you successfully entered the password.

With respect to opening a specific file, there is an extension for the file manager Files (aka nautilus) that allows to open a new file manager window, or edit a file with root privileges. It is available in the package nautilus-admin.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy