Linux: su, su - sum sudo specific ward separately

1, its

su to the root user, but did not go to the root user's home directory, that does not change the user's environment.

2, its -

su - to root down, and go to the root user's home directory, change to the root user's environment.

3、sudo

By sudo, we can have some super powers delegated targeted, and the average user does not need to know the root password (sudo are not using the root password, but the current user passwords), so sudo su relative unrestricted rights to He said, it is quite safe, so called sudo also be restricted su, sudo is additionally required license, it is also referred to as su licensing.

sudo process execution command is the current user to switch to root (or other designated users to switch to), and then to root (or other designated switch to the user) identity execute the command execution is completed, the direct return to the current user, and these the premise is to be authorized by the sudo configuration file / etc / sudoers.

sudo configuration file is / etc / sudoers, we can use his special editing tools visodu to configure Once configured, the user can switch to your authorized by sudo -l to see what the command is executed or prohibited .

Guess you like

Origin blog.csdn.net/weixin_43731793/article/details/92566831