Execute as Superuser
SH · Permissions & Ownershipsyntax
sudo [options] commandexample
sudo apt update
sudo -u postgres psql
sudo !!Note sudo !! reruns the last command with sudo (great when you forget to prefix it). -u runs as a specific user. Sudo access is configured in /etc/sudoers (edit only with visudo, never directly). Your password is cached for a short time after the first entry.