sudo Command in Linux

In this blog we will learn about sudo command .The full form of sudo is super user do so it allows you some extra privileges as an administrator or a power user so . First of all lets open our terminal , We can press ctrl+alt+ t to do this .

1.Ssay , I want to make a directory inside the etc’ folder this etc’ directory contains some of the configuration files and other files . let’s say I want to create a directory for me for some purpose right so I will just use mkdir commandand I will press enter and now this gives me error .

This is because Ubuntu Linux operating system by default when doesn’t have the administrative or root privileges so we need to use a special command which is called sudo in order to tell this Linux terminal that we want to execute this command as an administrator .

So whenever you see permission denied most cases of permission denied can be solved by this sudo command because sudo allows us to run any command or most of the command using administrative privilege or super user privilege .
Nextime , we will justgive the same command but this time we will just add a sudo in front of the previous command .

This command is going to ask me the password for my computer it’s the same password which you provide at the time of login .This password will not be shown on the terminal it will be hidden .Once you press Enter and you can see here $sudo mkdir command is executed .

2.Whenever we will need to install some third-party software something like GCC or G + + or any other libraries which we may require to perform some tasks most of the time it will ask you for this super user privileges .Example : $sudo apt-get install third_party_name .

3.Whenever we give $ sudo - s and press ENTER we will be able to see earlier we were having the user privileges which is the name of our PC but now we have the root privileges so it changes to the root user .

Now you can execute any command using a super user as yourself .Type #exit to to come out of super user .

This is the small introduction for sudo ,it has many capabilities .

Partner Sites

Be the first to comment

Leave a Reply

Your email address will not be published.