If you’re new to Linux, you might have seen the word “sudo” being thrown in Linux commands, and you may be wondering what it does. In this article, let’s look at Sudo in Linux, what it means, and how to use it to get specific work done.
What Is Sudo?
The word Sudo stands for “Superuser Do” and is pronounced as “Sue Dough.” By using sudo in command in the terminal, you ask your computer to run commands with root privileges. Now, if you ask, “But why do I need superuser permission when I’m already the superuser.” That’s a good question. You’ll need superuser permissions to get that stuff done, which the average user wouldn’t know about.
A good example would be editing files in the root directory. A lot could go wrong if an average, everyday user had to get their hands dirty and fiddle with files in the root directory; hence, you’ll need superuser permissions to edit files in that directory.
Another typical example would be updating the repos and packages using the terminal.
sudo apt update sudo apt upgrade
Apt update and upgrade need superuser permissions to run. If you don’t know what is apt update is, check out this article.
Difference Between Sudo and Su
If you’re a veteran Linux user, you might remember Su. For starters, Su and Sudo, for the most part, are similar, with the only difference being; While Sudo runs a single command with root privileges in the same terminal, su launches another shell instance with the privileges of the intended user.
Got any questions or feedback, do leave them in the comments section below. Also, check out our Short Bytes series, where we break down and explain complex tech jargon into words that can be easily understood.
If you like this simple explainer, check out our Short Bytes section. We take complex tech topics and break them into short, easy-to-understand articles.