sudo

Run a command as root (or another user)

sudo runs a single command with elevated privileges. sudo -i or sudo -s gives a root shell. sudo -l lists what you're allowed to run.

Example

$ sudo systemctl restart nginx
(runs systemctl as root)
Tip: Type it yourself in the terminal below - reading is not the same as doing.