Is there a possibility to grant administrative privileges to the current logged in user forever?
So I don't have to type
sudo everytime I want to do something?
/etc/sudoers allows your user to run ANY command as root (and not just a limited pre-defined set of commands) then you can run
sudo -i to get a root login shell. You'll be able to run commands as root until you
exit that shell, without having to preface every command with
$ sudo -i # id uid=0(root) gid=0(root) groups=0(root) # command-requiring-root # another-command-requiring-root # yet-another # and-one-more # exit $ id uid=1000(cas) gid=1000(cas) groups=1000(cas),[...]
BTW, if you have a default PS1 (or one containing
\$) then your prompt will change from
# when you are root.
Alternatively, you can use
sudo -s to get a non-login root shell. The difference is that a login shell sets the environment (and sources
/root/.bash_profile etc) as if root had logged in. A non-login root shell just runs your shell as root, with the environment modified/restricted by
sudo as for any other command.