DELAPARRA
Index
Color
NL
Category: CLI commands

sudo

Explained by Updated

What is sudo?

sudo: SuperUser Do — Run a command as the root (administrator) user. sudo runs a single command with administrator, or root, rights: sudo apt update or sudo systemctl restart nginx. It asks for your own password, not the root password, and logs what was run. It lets normal users do administrative tasks without logging in as root, which keeps an audit trail and limits mistakes to the commands that really need the extra rights.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about sudo

What should you keep in mind with sudo?

Use it deliberately. sudo in front of a wrong command can damage the whole system, so double-check paths, especially with rm, chmod and chown. Do not run your application as root; create a dedicated user for it. And avoid sudo for package managers like Composer and npm in your projects, which causes file permission problems and can run untrusted install scripts with root rights.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with S

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.