Key Points#
su-
The
sucommand is for switching to another user. This is useful if you need to run a lot of commands or manage a lot of files as that user.Using
suis a bit dated and most operations should be done viasudo, butsucan still be used form time to time. sudo-
The
sudocommand can also be used to switch to a user, but it's primarily function is to switch to the user, complete a task, and then "exit" that user session.The benefits of
sudois the ability to control what the user can do on a granular level. Thesujust an all-in command: you simply become the user and can do anything that user can do. Withsudo, you can control that down to specific commands.