Lucas Zuege's Blog

What is sudo?

The word sudo is an abbreviation of "Superuser Do" or "Substitute User Do." Much like what it sounds like, the sudo command allows you to run commands as another user, usually a superuser.

By default, when you installed your Linux Desktop, you likely added your user account to the Administrator group. This group gives you the ability to run the "sudo" command, however, it does not give your user account full root access.

Utilizing sudo allows you to run a command with root, or superuser, access. When using sudo, you are required to enter in your administrator account's password. This is usually the account you are logged in with.

Sudo is required for commands that need to make changes to your root filesystem. This includes update commands and some install commands.

An example of utilizing sudo to update your system would be...

sudo dnf update

If you were to attempt to run dnf update by itself, it will result in...

[username@PC-Name ~]$ dnf update
Error: This command has to be run with superuser privileges (under the root user on most systems).

When a command requires sudo, 9 times out of 10, it will tell you.