What is the difference between "sudo -i" and "sudo su" -

Both teams will register me as root. I know that there is a difference in the environment settings.

Which one are you using? Which one is better?

+4
source share
2 answers

suIt has only one purpose: to run a shell that runs as a given user ( rootby default).

sudo- This is a highly customizable program that allows you to run any command like any user with a setting that allows the local administrator to set restrictions on which commands you can run using sudo, as well as which commands require your password.

su - ( ) , , , , . sudo , , , .

+5

http://linux.die.net/man/8/sudo

-i ( ) , . , , , .profile .login, . , shell -c. , . sudo . , , , . " " sudoers (5) , -i , , sudoers.

0

All Articles