📖 What is sudo (SuperUser Do)?
sudo (SuperUser Do) is a program for Unix-like operating systems that allows users to run programs with the security privileges of another user, typically the superuser (root). It provides a secure way to perform administrative tasks without logging in as root.
"On the exam, sudo is the primary method to escalate privileges for tasks like installing software or editing system configuration files in Linux."
📚 Certification: CompTIA A+ Certification Exam Core 2 (220-1102)
🔑 What are the Key Concepts of sudo (SuperUser Do)?
- ▸ Privilege Escalation: Allows standard users to execute commands with root-level permissions temporarily, minimizing the risk of accidental system-wide damage during routine use.
- ▸ The sudoers File: Access permissions are managed via the /etc/sudoers file, which specifies which users or groups are authorized to use the sudo command.
- ▸ User Authentication: When executing a sudo command, the user is typically prompted for their own password, not the root password, to verify their identity.
- ▸ Audit Logging: Every command run through sudo is logged by the system, creating a critical security trail for auditing administrative changes and troubleshooting.
- ▸ Principle of Least Privilege: Supports security best practices by ensuring users only possess administrative rights for the specific duration of a required task.
🎯 How does sudo (SuperUser Do) appear on the 220-1102 Exam?
You may be asked to identify the correct command to install a software package or update the system repository in a Linux environment while logged in as a standard user.
A scenario might describe a technician needing to edit a protected system configuration file in the /etc/ directory; you must select the command that grants temporary root access.
❓ Frequently Asked Questions
What is the difference between using 'sudo' and the 'su' command?
Sudo allows a user to run a specific command as root using their own password. 'su' (substitute user) switches the entire shell session to the root account, requiring the root password.
What happens if a user is not listed in the sudoers file?
The system will block the command and display an error message stating the user is not in the sudoers file, while simultaneously logging the unauthorized attempt for the administrator.