" "
spot_img
HomeSOLUTIONSHow Does it Work and What Can I do...

How Does it Work and What Can I do as a SuperUser?

What is Linux?
Linux is a family of open-source operating systems that are based on the Linux kernel, first released on 09/17/1991 by Linus Torvalds. You can find the Linux OS packaged into distributions that include the kernel and supporting system software, libraries, and packages. Linux is a popular and versatile operating system that powers many devices, from personal computers to servers, smartphones, and other embedded systems. 
Linux is an open-source operating system, which means that anyone can access, modify, and distribute its source code. The source code is the set of instructions that tells the computer how to operate. Popular distributions include AlmaLinux, RockyLinux, Ubuntu, Arch Linux, RedHat, Debian, CloudLinux, and CentOS among many others. 

 
How Does Linux Work?
The Linux operating system consists of two main components: the kernel and the user space. The kernel is the core of the system that manages the CPU, memory, and peripheral devices and is the only part of the system that is called “Linux”. The user space is the part of the system that contains the programs, tools, and services that the user interacts with. The space includes a graphical server, which displays the graphics on the monitor, and a desktop environment, which provides a user interface with icons, menus, and windows.
One of the unique features of Linux is that it is modular and customizable. Unlike other operating systems that come as a fixed package, Linux allows users to choose and install different components according to their needs and preferences. For example, users can choose from various desktop environments, such as GNOME, KDE, Xfce, etc., or use a command-line interface instead. Users can also install different applications and utilities from various sources.
 
What is a Linux SuperUser?
A superuser is a user who has the highest level of access and privileges on a computer system. This user can perform any task, modify any file, install any software, and change any setting on the system along with being able to create, delete, and manage other users and their permissions. A superuser is also known as a root user in a Linux environment. The name may vary depending on the operating system or the software. For example, on Linux and Unix systems, the superuser is usually called root, while on Windows systems, the superuser is usually called administrator.
 

 
Being a superuser gives you complete control over your system. You can customize it to your liking, install any software you want, fix any problem you encounter, and access any data you need. You can also perform advanced tasks that require superuser privileges, such as backing up your system, managing network settings, configuring security features, monitoring system performance, and pushing for system updates.
Taking actions that can only be performed by a SuperUser/root, will display the following messages or will be met with your actions failing.
 

 
To gain access to the root user, you will need to use the sudo command, which is a Linux command that allows a user to execute a command with elevated privileges temporarily, as shown in the example below.
 

 
In the previous example, despite using sudo I was still met with an error. That is because whichever user is trying to run a command with elevated privileges must be part of the group that allows such actions.  
To add a user to the sudoers/root group, you can use the command usermod -aG sudo <username> once you have logged back into the server as the root user.
 

 
Once that is done, you can then use sudo to run commands with elevated privileges such as done below where I was attempting to update the package manager and was met with a password prompt.
 

 
If you wish to temporarily move to the root user from the regular user to perform more operations with escalated privileges without having to type sudo, you can use sudo su, as shown in the example below.
 

 
Being a superuser also comes with great responsibility. You need to be careful with what you do as a superuser, as you can potentially damage your system or compromise its security. You can accidentally delete important files, change critical settings, install malicious software, or expose sensitive data. You can also make your system vulnerable to attacks from hackers or malware that can exploit your superuser privileges.
Therefore, it is advisable to use your superuser privileges only when necessary and for a limited time. You should also follow some best practices, such as using strong passwords, updating your system regularly, avoiding suspicious links or downloads, and scanning your system for viruses or malware. 

- Advertisement -

- Advertisement -