kids encyclopedia robot

Sudo facts for kids

Kids Encyclopedia Facts
Quick facts for kids
sudo
Sudo logo.png
Sudo on Linux screenshot.png
The sudo command in a terminal
Original author(s) Robert Coggeshall, Cliff Spencer
Developer(s) Todd C. Miller
Initial release Around 1980
Stable release
1.9.15 Edit this on Wikidata / Error: first parameter is missing. ()
Written in C
Operating system Unix-like
Type Privilege authorization
License ISC-style

sudo (pronounced "soo-doo") is a special computer program. It works on computer systems like Linux and macOS. Sudo lets users run programs with the special powers of another user. Usually, this means running something as the "superuser" or "administrator."

The name "sudo" first meant "superuser do." This is because it was mostly used to do things as the superuser. But now, it can also mean "substitute user, do." This is because sudo can let you run commands as other users too, not just the superuser.

Unlike a similar command called su, you usually need to type your own password to use sudo. You don't need the password of the superuser. After you prove who you are (with your password), and if the system's special settings allow it, sudo will run the command you asked for. These settings can be very detailed. They can say who can use sudo, which commands they can run, and if they need a password every time.

How Sudo Works

When you use sudo, you type your own password. This is safer because you don't have to share the superuser's password. Only certain users can use the sudo command. These users are usually part of a special group, like the "wheel" group or the "sudo" group.

After you type your password, sudo remembers that you're allowed to use it for a short time. This "grace period" is usually about 5 minutes. During this time, you can run more sudo commands without typing your password again.

Sudo also helps keep track of things. It can record every command that is run using sudo. If someone tries to use sudo but isn't allowed, the system will tell them. It can also send a message to the main administrator. This helps keep the computer secure.

A Brief History

The first version of sudo was created around 1980. It was made by Robert Coggeshall and Cliff Spencer at the University at Buffalo. Later, between 1986 and 1993, people at the University of Colorado Boulder made many changes and added new features. Todd C. Miller has been in charge of keeping sudo updated since 1994. Since 1999, sudo has been available under a special license. This license lets people use and share the program freely.

The picture used for the sudo logo is a fun reference to a popular webcomic called xkcd.

Setting Up Sudo

Sudo uses a special file to know who can do what. This file is called /etc/sudoers. You need to use a special command called sudo visudo to change this file. This command helps make sure you don't make mistakes that could break sudo.

In the /etc/sudoers file, you can set many options. For example, you can choose which users can use sudo. You can also decide if they need a password every time. There's even a fun "easter egg" you can turn on. If you type the wrong password, it will show you a funny insult!

Sudo's Importance

Sudo has become very important in how many computer systems work today. On many Linux distributions and macOS computers, sudo has largely replaced logging in directly as the main administrator. This makes it safer to do administrative tasks. It also helps prevent some ways that bad guys might try to break into a computer.

Other Tools Like Sudo

There are other programs that work in a similar way to sudo:

  • sudoedit is a handy tool. When you use sudoedit, it lets you edit files that usually need special administrator powers to change.
  • In February 2024, Microsoft released its own version of sudo for Windows. It works much like the Unix version. It lets you run commands with higher powers from a normal command window.
  • Some computer systems also have visual tools that work like sudo. These tools let you click buttons to do things that need special powers, instead of typing commands. Examples include pkexec on Unix-like systems, User Account Control on Windows, and Mac OS X Authorization Services.

See also

Kids robot.svg In Spanish: Sudo para niños

  • chroot
  • doas
  • runas
kids search engine
Sudo Facts for Kids. Kiddle Encyclopedia.