What is the Linux Sudo Command?

Sudo

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.

Usage

svg viewer

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.

New on Educative
Learn any Language for FREE all September 🎉
For the entire month of September, get unlimited access to our entire catalog of beginner coding resources.
🎁 G i v e a w a y
30 Days of Code
Complete Educative’s daily coding challenge every day in September, and win exciting Prizes.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved