The root user is one of the most vital parts of the system administration of the Linux operating system. Moreover, this user can affect the whole system by performing any task. In a multiuser system, the root users control the activity of other users. In this article, I will demonstrate a complete overview of what is root user in Linux.
What is a Root User?
The root user is the super user or administrator who has full access to all the system files, directories, and commands of the Linux operating system. This user can do any task which can change the security and stability of the whole system.
Difference Between a Root User and a Non-Root User
A root user is a user having superpowers who can perform all the administrative tasks (i.e. package installing, user removing, accessing any files or directories, and many more) that can affect the whole system. On the other hand, a non-root user having limited privileges can not perform such administrative tasks that can affect the system.
How to Create a Root User?
In Linux, various ways are available to create a root user. Any user with root privileges can add a new root user in Linux from both the graphical user interface and the command line. Both of them are outlined below.
Method 01: Creating Root User from GUI
In the following section, I will create a root user from GUI(Graphical User Interface). To do so, follow the below procedures.
Steps to Follow >
➊ Find the view application button on the left corner of your home screen and left-click on it.





Output >
In the following image, you can see I have created a new root user named Thiago.
Method 02: Creating a Root User from the Command Prompt
Here, I will create a root user from the command prompt. To do so, follow the below procedures.
Steps to Follow >
➊ Open the Ubuntu terminal.
➋ Then, type the following command then press ENTER button to create a new user named Donald.
sudo adduser donald

sudo usermod -aG sudo donald

groups donald
Output >
The new user named donald belongs to the sudo group, this means that donald is a root user.
System Management Operations Exclusive to Root User
A root user in Linux can do all kinds of administrative tasks(i.e. package installing, user removing, accessing any files or directories and many more). In the following section, I have illustrated a few o the administrative tasks that only a root user can do.
Example 1: Installing Any Package in the System
Only root users in Linux can install/remove packages in the system. Here, I will install the nano package with the root user named donald. To achieve so, follow the below procedures.
Steps to Follow >
➊ At first open the ubuntu terminal and type the following command to switch the user to the new root user named donald.
su donald

whoami

sudo apt install nano
Example 2: Changing Permission of a File
A root user can alter the permission of any file and directory. Here, I will switch my current user to donald who is a root user. Then, I will change the writing permission of the Music directory. To do the task, follow the procedures given below.
Steps to Follow >
➊ At first, open the Ubuntu terminal.
➋ Then, type the following commands to the terminal and then press ENTER to check the permission information of all the files and directories inside the current directory.
sudo ls -l

sudo chmod a+w Music

sudo ls -l
Output >
The following image shows that as a root user (donald), I have altered the permission of the desired directory.
Example 3: Accessing Any File of the System
As a non-root user, you can not access the root or any other files. But as a root user, you can access the root or any other files. Here, I will first try to access the /root directory as the sdg user which is not a root user. Then, I will try to access the /root directory as the donald user who is a root user. To do so, follow the below procedures.
Steps to Follow >
➊ At first, open the Ubuntu terminal.
➋ After that, copy the following command on the terminal to switch the user to donald who is a root user.
su donald
➌ Next, tap the ENTER button.
➍ Then, type the following command on the command prompt to access the /root directory as the donald user who is a root user.
sudo ls /root
➎ Now, press the ENTER button.
Output >
The following image shows that the non-root user named sdg can not access the /root directory but the root user named donald can access the /root directory.
Conclusion
In this article, I have tried to sum up the utilities of the root user and showed some sample activities a root user can perform. By going through this article, you will gain the skill of creating a root user and performing some sample operations which only a root user can do.
Similar Readings
- What is Sudo in Linux [A Detailed Review]
- What is Root Partition in Linux? [A Complete Guide]
- What is Root Directory in Linux? [The Ultimate Guide]
- What is Root Access in Linux [With Practical Examples]
FUNDAMENTALS A Complete Guide for Beginners









