sudo, ("super-user do"), is a command that allows a user to perform tasks that require superuser/root permissions, without logging in as root or assuming root abilities full-time. It's usage is common in distros aimed at new users, who might not be aware of the consequences of logging in as root.

Example usage

sudo is used to perform tasks that a normal user is not allowed to do. In this example, the user might want to upgrade the software on his system:

user@linux:~$ apt dist-upgrade

Since the user is not logged in as root, the system will return something like:

 E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
 E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

If the user were to execute the same command using sudo, however:

user@linux:~$ sudo apt dist-upgrade

he/she will be prompted for their password, and then the command will execute normally.

External links

Community content is available under CC-BY-SA unless otherwise noted.