sudo [options] commandArguments explained
- command is what to run with elevated rights.
- -u chooses another target user.
- -l lists allowed commands.
- -k invalidates cached credentials.
Common examples
sudo apt install curlRuns apt with administrative permissions.
sudoedit /etc/hostsOpens a protected file using sudo's safer edit workflow when configured.
| Field | Details |
|---|---|
| Command | sudo |
| Category | Permissions and Ownership |
| Primary use | Runs a command with elevated privileges according to policy. |
| Syntax | sudo [options] command |