The sudo command is a powerful flag in Linux terminals. Sudo, short for Super do, allows users to run commands with root or superuser privileges.
A root user is an account that has full privileges. They do not require permission to carry out any command.
Certain actions on computers require root access, and sudo allows users to run those commands without having to switch accounts.
Given the power of the root account, we recommend that, instead of logging into the root account, users only use root access when certain commands ask for it.
The screenshot above shows the sudo command in use. The user unsuccessfully attempts to update the system package lists and repositories using the apt-get update
command. Permission to run this command is denied twice until the user uses sudo
.
While it was not required in this case, users will often have to enter their password with the sudo command if they have one and have not entered it into that terminal before.
Free Resources