Problem Statement
Differentiate between sudo and su commands.
Explanation
The sudo command executes a single command with superuser privileges, while su switches the current shell to another user (often root).
sudo is safer because it logs activity and limits scope, whereas su grants a full privileged shell.
Practice Sets
This question appears in the following practice sets: