Team su temporarily changes the logged in user of a shell session. It’s different from the command sudo which grants the currently logged on user the right to execute commands with elevated privileges.
Purpose of the su and sudo commands
Team su changes your registered session shells from one user account to another. This practice is useful for troubleshooting user permission issues. You must have an account password in order to access it through su.
If you are doing su without specifying a user account, the system assumes that you intend to use the root account You must know the root account for this process to work.
Upon completion session su enter command exit, to sign out of the replaced account and return to the originally registered account.
people just love tell stories that su and sudo mean. Generally, one can use a mnemonic such that su — this is substitute user, a sudo — as a replacement user. Team su is not a «super user» command. Commands are commands; if you spend too much mental space thinking they are «worth something», you lose a bit of the flexibility these related commands offer.
In contrast to this, sudo is designed to grant elevated permissions to a single command. For example, updating packages requires elevated permissions; a regular user account cannot perform this function. But if this account is enabled as sudoer it can cause sudo, and then a privileged command or program.