What is sudo? Getting to Know the Sudo Command on Linux

What is sudo? Getting to Know the Sudo Command on Linux

To make changes to the system such as adding, editing or deleting system files, and performing administrative activities such as installing applications, adding new users and so on, you can do this in two ways.

First, you can use a user named “root” which is superuser or the user with the highest permissions on Linux. By using “root” you can make any changes to system files, you have full access rights to the system.

Another way, if you don’t have or are not currently using the “root” user is to use the “sudo” command from a normal user who has administrative privileges (not all users can do this, only users have administrative privileges).

The method you use between the two methods may depend on which distribution you are using. Because some Linux distributions like Fedora, RedHat, OpenSuSE and others have it enabled superuser “root” by default.

While some other distributions such as Ubuntu, Linux Mint, Elementary OS and others do not activate superuser “root” by default for some security reasons. Why? So what exactly is “sudo”? Let’s discuss.

A Brief History of sudo

“sudo” was originally created by Bob Coggesall and Cliff Spencer in 1980. Since its first invention, “sudo” has been re-configured several times by adding new capabilities and being re-developed by other developers.

It wasn’t until around 1994 that Todd Miller developed “sudo” at Colorado University, a version of the unofficial from sudo which was later released and was called “CU sudo”.

This version supports or can be used on more Linux distributions than the previous version which only supports certain distributions. In addition, Todd Miller also made many improvements to the bugs which was in the previous “sudo”.

While the original “sudo” had no new releases and fixes since 1991, Todd Miller’s “sudo” was released again in 1999 with various fixes and capabilities. Because of these improvements and capabilities, the “sudo” version developed by Todd Miller became the “sudo” version used in Linux distributions that we use today.

What is sudo?

If you are used to using traditional Linux, then you must be familiar with using superuser “roots”. You can even switch from a normal user to a “root” user just by using the “su” command.

For many people, doing login logging into the system as the “root” user is a dangerous thing, considering that “root” can easily make changes to system files and perform administrative actions such as installing applications and so on.

That’s why “sudo” was created.

“sudo” itself is an abbreviation, initially “sudo” stands for “substitute user do”, but over time “sudo” is more often and appropriately referred to as an abbreviation of “super user do”.

“sudo” in an effective and secure way allows a normal user to run a program as a superuser or “root”.

The use of “sudo” to perform administrative actions that can make changes to system files is believed to be safer than having to use the “root” user directly, because the user will be prompted password in advance and will be notified of security confirmation before making system file changes or administrative actions.

Imagine if you accidentally deleted an entire system file just because you pressed a key or typed a wrong command, or imagine if you accidentally installed a malicious application that could harm your system files. Those are some of the reasons why using “sudo” is safer than having to use the “root” user directly.

However, there are still those who disagree with this opinion. That is why there are some distributions that prefer to use only the “sudo” method to perform administrative actions instead of enabling the “root” user manually. defaultand there are also Linux distributions that allow the use of the “root” user freely defaults.

However, with respect to which opinion you believe, and what distribution you are currently using, we know there will always be advantages and disadvantages to each side, and that it will always be debatable.

Please use the “root” user as long as you are sure the actions you are taking are safe and you know the safe limits for using them. At the end of the day, it’s us as the users behind it that matters the most.

How to Use the Sudo Command

Using the “sudo” command in all the basic commands is very easy, just add the word “sudo” to each command you want to execute. For example, you want to run the “dpkg” command to install an application with the “.deb” package format on the system you are using.

If using a normal user, when running the command “dpkg -i nama_application.deb” to install an application, you will get a warning error that the user you are using does not have access to run the command.

That’s because ordinary users naturally default can’t install app on Linux machine. So so that you can install the desired application, you must use the command “sudo dpkg -i software.deb”.

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *