Linux for Developers
/Beginner
sudo
Definition
Superuser Do. A program that allows a permitted user to execute a command as the superuser (root) or another user, temporarily granting them ultimate administrative privileges.
Explain Like I'm New
The 'Simon Says' of Linux. If you try to install software, Linux says 'Permission Denied'. If you type `sudo install software`, Linux says 'Yes, Master' and does it.
Real World Example
You try to open the system password file by typing `cat /etc/shadow`. It fails. You type `sudo cat /etc/shadow`. It prompts for your personal password to verify it's really you, then opens the file.
Common Use Cases
- •Installing software
- •Modifying system files
- •Managing users
Interview Questions
basic
- When you use `sudo`, does it ask for your personal password, or the Root user's password?
intermediate
- Why is `sudo` considered much safer than just logging in directly as the `root` user?