Skip to content

Key Points#


The su command 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 su is a bit dated and most operations should be done via sudo, but su can still be used form time to time.


The sudo command 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 sudo is the ability to control what the user can do on a granular level. The su just an all-in command: you simply become the user and can do anything that user can do. With sudo, you can control that down to specific commands.