Introduction
The sudo command was created and developed by Bob Coggeshall and Cliff Spencer at the Department of Computer Science at SUNY/Buffalo about 1980. It was run on a VAX-11/750 with 4.1BSD. In December 1985, an upgraded version ascribed to Phil Betchel, Cliff Spencer, Gretchen Phillips, John LoVerso, and Don Gworek was submitted to the net.sources Usenet newsgroup.
The sudo command is one of the primary and essential commands for any Linux user. The meaning of the sudo command is Super User Do. It gives power to the user to run any particular commands in superuser mode. This command is present in Windows also as the “Run As Administrator option”.
Linux limits tools and commands to change the packages or dependencies by default. The best example is when users want to install a new tool, they must specify the sudo command first. It protects Linux to crashed or any other technical problem.
The sudo command acts as a security policy for execution in Linux. The user-id is used to check whether the username can use the sudo command. This command supports a plugin architecture for security policies, auditing, and input/output logging. Third parties can create and distribute plugins that function flawlessly with the sudo command. Still, they must guarantee that the plugin does not include any vulnerabilities that might be exploited to take control of the Linux system.
sudoers file
The default security policy is sudoers, which may be changed using the /etc/sudoers file or LDAP. Every user using this command must be listed in the sudoers file. Remember to use the sudo command to change or see the sudoers file. Users should use the “visudo” command to modify the sudoers file. By default, sudo requires users to authenticate themselves using their own password rather than the root password.
How to use the command?
Syntax: sudo <command>
Usage
- To install any tool in Linux.
For example, try to install steghide in Parrot Security OS.
where sudo: Gives root permission to install the tool.
apt-get: An Advanced Package Tool (APT) library.
install: A flag which represents the tool will install.
steghide: A steganography tool.
-y: A flag which indicates to install it and its dependencies (if required).
- To change the terminal to root terminal.
where su: su is a command which means Substitute user or switch user. Here, it is changing the normal user to the root user.
Video Explanation
Conclusion
The sudo command is one of Linux’s fundamental and essential commands. Blocking root privilege while installing a new Linux distribution helps prevent the system from crashing. It’s good that a user with complete knowledge can modify this command using the sudoers file.