JAEN

Linux

sudo

CautionRun as superuser

sudo <command>

Runs one command as root. -i opens a root shell; -u runs as another user. Policy lives in sudoers.

Examples

  • sudo systemctl restart nginxRestart a service as root
  • sudo -iOpen a root shell

Syntax

sudo [-i] [-u user] <command>

Before you run it

Mistakes affect the whole system.

Related commands

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store