Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

operating systems
access rights

What is the Linux Sudo Command?

Educative Answers Team

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

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.

RELATED TAGS

operating systems
access rights
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring