What is Linux? What is a Linux Distribution?

The Parts of a Linux System

Linux is diversity, with all the advantages of disadvantages of that. There are so many distributions and flavors that it can be quite confusing! This is an attempt to give a high-level overview of what general parts make up a "Linux" system.

The major pieces described in this guide are:

The Kernel

This is the first piece of software that runs on a Linux machine. It is responsible for starting up the machine, initializing all the hardware, and getting things ready to work with other programs.

As with everything else, in theory different kernels could be used with the same system, as long as they provided the expected services. In practice, the Linux kernel is so ubiquitous that the entire operating system is casually referred to as "Linux."

The kernel provides its services in two main ways: Through functions, and through files. Software call call kernel functions that do things like display video output, play sound, and so on. Software can also open special files that the Linux kernel places on the system. /dev/urandom, for example, is a special file that is actually a Linux interface that provides random numbers if you open it in a program. Devices can also be exposed as files: For example, /dev/input/mouse is a file that streams mouse input information: if a program opens it, when it reads the file it will get updates on what the mouse has done since the file has been opened.

The kernel can be customized to have certain hardware features supported and be tweaked to be better suited to things like being a server, a workstation, or a normal desktop. One of the major services a Linux distribution provides is a pre-configured, pre-built kernel.

The File System Layout

The second big part of a Linux system is the file system layout. One thing a Linux distribution does is offer a guaranteed location for everything software needs to be able to use at runtime. For example, where should a program that needs to write logs write them to, and where should a program that displays logs read them from? When a program is running, where can it find software libraries it depends on being installed on the system?

One could argue that all a functioning computer system really is is a bunch of guaranteed locations for different files and programs that operate on those files and are dependent on their locations.

On Linux, this layout is standardized by the Filesystem Hierarchy Standard. However, in practice, one of the services a Linux distribution provides is guarantees about exact file system layout.

The System Utilities

This is actually quite a big category that could be further divided, but for the purposes of giving a high-level overview, it's easier to think of this as another component.

System utilities are pieces of software that are not the kernel that provide services for other software on the machine. You can think of these as the "plumbing," "hardware," and "wiring" of the system.

One big part of these are a collection of software tools and libraries written by the GNU project that form a big part of the foundation of what makes a Linux system function, and more precisely function in the tradition of Unix systems and offer POSIX compatibility. You may have heard the term GNU/Linux: This emphasizes that a "Linux" system is a Linux kernel running with the GNU packages that offer all these services. Note, however, that not all Linux system use all of these GNU packages and there's no need for them to use any of them, as long as the necessary services are provided by some replacement.

All of these "system utility" software packages are built on top of the kernel abstractions. For example, you have software that manages network connections by interfacing with kernel networking drivers, handles logging using kernel file system functions, runs tasks on a schedule using kernel clock features, handles security and permissions using kernel and kernel file system security features, starts up other software after the kernel boots, and more.

There is a lot of lively debate about these backend services and the philosophical and architectural trade-offs that they make. For example, debates about the Wayland display manager, systemd, and so on.

A Linux distribution provides a full set of system utilities that function together to provide a working operating system. This is one of the larger parts of what makes a distribution a distribution.

The Package Manager

This part of the system might be put in the utilities section, but it is such a fundamental part of how a particular Linux distribution works that it's been separated out.

In particular, one of the major services that distributions tend to provide and in many cases that originate from the bigger mainline distributions are package managers.

A package manager is how you install new software. It manages dependencies so that when you install a particular piece of software that you need or want, all the other software it depends on is installed automatically, and any configuration is performed to allow the new software to function.

Additionally, a package manager provides regular software updates, which are vital to maintain functionality, fix defects, and provide security updates for a system.

Maintaining package versions, dependencies, and updates is probably the biggest, most important part of the day-to-day work of a Linux distribution. It can be a bit of a chore! But it's the foundation of keeping users' systems stable, reliable, and secure.

Some examples of package managers and their origins:

The Desktop Environment

This is probably what most personal computer users think of as 'the operating system.' On Linux, there are a variety of desktop environments. Some are small projects that depend on a variety of software from all sorts of other developers to provide a working experience, while others are much bigger affairs with a whole collection of in-house software that provides a complete, cohesive experience.

Generally a desktop environment handles how you move windows around, how you start programs, and depending on its size, what programs you use to navigate the file system and configure the system.

The two biggest desktop environments are KDE and Gnome. If you were to compare them to commercial desktop environments, Gnome feels much more like MacOS, which KDE feels much more like Windows.

However, both Gnome and KDE can be used on all sorts of different distributions with any number of different parts of the stack described here.

One of the nice things about Linux is that you can install a smaller desktop environment or even pieces of different desktop environments and customize the system to your liking. That said, if a computer is more a tool to get things done for you, a larger desktop environment project such as KDE or Gnome likely has a lot in its favor.

Linux distributions often offer a collection of different desktop environments, usually provided as separate installers. Sometimes these are called "flavors."

No matter which you install, the distribution will be the ones providing dependencies and updates, usually through a single unified package manager used by all the flavors.

The Distribution

Hopefully, now you have a better idea of what a distribution is and what services it provides: In a nutshell, it is a prepackaged collection of the above software, usually with a package manager either developed by the distribution or a distribution it was in turn derived from, and a team that keeps the distribution maintained, in large part by maintaining the backend the package manager uses to download software and software updates onto users' systems.

Previous: Servus et Machina