What are the basic components of Linux?

Linux 2 min read

A Linux system consists of several layers that build upon one another. When the server is started, these layers become active in roughly the following order; therefore, this list also shows what happens between the server being switched on and the user logging in.

1. Bootloader

After the machine is switched on, the firmware (BIOS or UEFI) launches the boot loader; on Linux, this is almost always GRUB. This loads the kernel and a temporary initial filesystem (initramfs) into memory, which contains the modules required to access the disks. From the GRUB menu, the system can also be booted using an older kernel if there are problems following an update.

2. Kernel

The Linux kernel is the core of the system: it communicates directly with the hardware, manages memory, processes, file systems and the network, and serves programs via system calls. The version of the kernel currently running is displayed by the uname -r command.

3. Init system: systemd

The kernel first starts a single process (PID 1), which is responsible for starting the other services. On modern distributions, this is systemd. It starts the network, the web server, the database, the SSH server and other background services (daemons), and it also collects their logs. Our article on systemctl covers the management of these services.

4. System directories

Programs do not implement all basic functions themselves, but instead use common, shared libraries. The most important of these is the C library (known as glibc in most distributions), through which programs call the kernel’s services. In addition, OpenSSL is responsible for encryption, whilst zlib handles compression. A security update to a library therefore affects all programs that rely on it.

5. Shell and basic commands

The shell (command interpreter; on Linux, this is usually bash) receives and executes the commands you type. Basic commands such as ls, cp, mv, chmod or grep are separate programs, most of which form part of the GNU project. The article on basic Linux commands provides an overview of how to use them.

6. Package Manager

The installation, updating and removal of programs is carried out by the package manager, which also resolves dependencies. AlmaLinux, Rocky Linux and CloudLinux use the dnf command (formerly yum), whilst Debian and Ubuntu use the apt command. This is one of the most striking differences between the distributions.

7. Directory structure and configuration files

Linux organises all files into a single tree starting from the root (/). The most important directories are:

  • /etc: configuration files for the system and services (for example, /etc/ssh/sshd_config);
  • /var: variable data, such as logs (/var/log) and, frequently, websites (/var/www);
  • /home: users’ home directories; the root user’s directory is /root;
  • /usr: installed programs and directories;
  • /tmp: temporary files.

The settings are almost always stored in simple text files, so they can be edited using a text editor and easily backed up.

8. User programs and graphical interface

On desktop computers, this forms the basis for the graphical environment (such as GNOME or KDE Plasma) and user applications. Servers generally do not have a graphical interface: VPSs are managed via SSH using the command line, so the machine’s resources are dedicated to serving websites and applications.

Back: Linux articles (62)