What is Root Access in Linux? [With Practical Examples]

In Linux, Root access means possessing the ultimate administrative privileges. The root access gives the opportunity to log in as a root user in the system administration. Moreover, it provides full control of the entire system to the user. In this article, I will demonstrate a complete overview of what is root access in Linux.

What is Root Access in Linux?

Root access refers to the ability to log in as a root user who can control the whole system.  With root access, anyone can perform system-wide tasks (i.e. Installing any software, creating, deleting modifying any user) in Linux. Furthermore, the user with root access is the most powerful user in the Linux operating system because it can damage the whole system if any mistake is made. So it is recommended to log in with root access only when it is necessary otherwise log in without root access.

Working Mechanism of Root Access in Linux

The root user in the Linux operating system is created during the installation process. To access root permission you have to log in as the user who has root access or switch user using the su command to the user who has root access. Another way to get root access is to use the sudo command before the command you want to execute. Then, it will ask you for the password of the currently logged-in user. It ensures that only the authorized users can only perform the action as the root user.

Significance of Root Access in Linux

The user with root access is necessary for a few reasons. First of all, it enables you to perform some tasks like software installation, configuration, modifying system files, and other system-level tasks. Secondly, root access enables you to make the necessary change to develop a secure and stable system. And finally, root access enables you to make a customized system which is not possible with a regular user.

Practical Usages of Root Access in Linux

You can perform a thousand kinds of tasks with root access and control the whole system. Some of the practical uses are given below.

Example 1: Installing Any Package With Root Access

It is a must to have root access to install or remove any package in the system. Here, I will install the cal package with root access. To achieve so, follow the below procedures.

Steps to Follow >

➊ At first, open the Ubuntu terminal.

➋ Then, type the following command in the command prompt.

sudo apt install ncal

➌ Now, press the ENTER button.

Output >

The following image shows that with root access I have installed the nano package.I have installed the nano package with root access.

Example 2: Creating a New User With Root Access

It is impossible to create a user without possessing root access. Nevertheless, with root access, I will create a user named biden from the command prompt. To do so, follow the below procedures.

Steps to Follow >

➊ Open the Ubuntu terminal.

➋ Then, type the following command.

sudo adduser biden

➌ Now, press the ENTER button.

Output >

The root access has given me the privilege to create a user named biden, as depicted in the following image.The root access has given me the privilege to create a new user named biden.

Example 3: Deleting Any User from the System

It is impossible to delete any user without root access. However with root access, now I will delete a user named trump. To do so, follow the below procedures.

Steps to follow >

➊ Open the Ubuntu terminal.

➋ Then, copy the following command into the terminal.

sudo userdel trump

➌ Now, tap the ENTER button.

Output >

The following image shows that with root access I have deleted a user named trump.I have deleted a user named trump with root access.

Conclusion

In this article, I have tried to sum up the utilities of root access and showed some sample activities you can perform with root access. By going through this article, you will gain the skill of using root access properly.


Similar Readings

Rate this post
Susmit Das Gupta

Hello everyone. I am Susmit Das Gupta, currently working as a Linux Content Developer Executive at SOFTEKO. I am a Mechanical Engineering graduate from Bangladesh University of Engineering and Technology. Besides my routine works, I find interest in going through new things, exploring new places, and capturing landscapes. Read Full Bio

Leave a Comment