Score:-2

How to open terminal always with sudo privileges

us flag

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".

24601 avatar
in flag
be careful what you wish for is the best advice...
Shubhang Kakkar avatar
us flag
What are you trying to say @24601
ar flag
Does this answer your question? [How do I start Nautilus as root?](https://askubuntu.com/questions/156998/how-do-i-start-nautilus-as-root)
Shubhang Kakkar avatar
us flag
no@user68186 i am asking something else
fr flag
There is a reason there is no "run as administrator" option in Linux. This reason is security. You don't *need* root privileges unless you change system settings, and you always need to type your password to do that. This keeps your system secure.
Score:1
cn flag

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.

Artur Meinild avatar
vn flag
Why was this downvoted? It's a perfectly valid answer to the question. Is it a security concern? Maybe, but not more than typing `sudo -i` as soon as you enter your terminal. Is this a bias because someone thinks they know better how a particular user should use their own system?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.