Permissions and Ownership

sudo

Runs a command with elevated privileges according to policy.

sudo lets permitted users run commands as root or another user. It is a temporary privilege boundary, not a different shell by default.

Syntax
sudo [options] command

Arguments explained

  • command is what to run with elevated rights.
  • -u chooses another target user.
  • -l lists allowed commands.
  • -k invalidates cached credentials.

Common examples

Install a package
sudo apt install curl

Runs apt with administrative permissions.

Edit as root carefully
sudoedit /etc/hosts

Opens a protected file using sudo's safer edit workflow when configured.

sudo Command
FieldDetails
Commandsudo
CategoryPermissions and Ownership
Primary useRuns a command with elevated privileges according to policy.
Syntaxsudo [options] command