Anatomy of a Linux System: An Overview

Anatomy of a Linux System

Here at Linux University, we have been debating the best way to show as many people as possible, in as simple way as is possible, the way a Linux based system works “under the hood”. What we talk about here will be true for all platforms supported by Linux, from a hand held such as a tablet or a mobile phone to the huge, such as a super computer in a research facility.

This is the first article in a planned series that deals with the anatomy of a Linux based system.

In general, any Linux based system comprises of several parts. These are:

The Kernel

All Linux based systems are built around the Linux Kernel. The kernel is the heart of the operating system; it is what makes the hardware go. Linux kernel is what is classed as a “monolithic kernel”, which means that all the core kernel functions and any hardware driver modules are build into a single executable which is then executed in what is known as “kernel space”, which means it has full privileged access to the underlying hardware.

The Linux kernel provides an abstraction of the hardware, along with a set of operations known as “system calls”, and controls a huge number of functions such as process control and process scheduling, reading and writing to and from the system memory, virtual memory management, and virtual file system management. In addition to these, the Linux kernel uses a host of “kernel modules”, which provide device specific and operating system function drivers, and it is these that make access to sound cards, video cards, network interfaces, keyboards, USB and eSata devices possible.

System Libraries

The “libraries” are a collection of computer code that provide a way of doing common tasks, such as reading or writing a from a file, or opening a network connection, and these are used to make programming simpler and to ensure that all programs which use a particular library interface with the kernel and other programs the same way.

All Linux systems have a number of system libraries that are used by the utility and the shell programs to to do their work. Some of these libraries are dedicated to working within the “user space” and some of them provide an abstraction of the kernel system calls such that operations that might take several system calls to achieve only require one call to the library code.

Command Shell and command line utilities

While having a good kernel is essential, there is (usually – some kernel researches out there disagree) a need to have a number of utilities that will allow the users of the system to do useful things.

These utilities most commonly consist of a command shell and a number binary programs that are used by one or more users to make request for access to system resources or for the kernel to do certain things via a set of system libraries and system calls.

Most Linux distributions use a Linux Standards Base to define its functions common a set of standard utilities and libraries, which allow users of the system to do things like mount and unmount file systems, list and access contents of a file systems, start and stop processes, load and unload kernel driver modules, and many other tasks.

Graphical User Interfaces

The “X windows system” is the most commonly used graphical user interface system provided by various Linux distributions, and it is most commonly installed on Linux based desktops and laptops, an some tablets, while most Linux based PDAs and mobile phones, including the Google Android based ones, have their own dedicated graphical user interface engines.

At its core the X window system consists of an ‘x-server’ process that provides the abstraction of the graphics hardware and input devices to a “desktop environment” (such as Gnome, XFCE, Unity and KDE for example) and/or a “window manager” process (such as fvwm, twm, Window Maker or awesomeWM to name a few) that uses the ‘x server’ and the kernel graphics hardware to paint the actual look and feel of the graphical user interface.

The various graphical user interfaces that are possible on a system Linux come with a suite of applications and utilities to make the system look much prettier, more functional, or simply easier to use.

While not actually necessary for a fully functional Linux system, a graphical user interface can be of great help to the human user of the system, and will enable them get the most out of the system.

This concludes the initial look at Linux systems. In future instalments of this series we will take an in-depth look the kernel and kernel modules, system calls, the shell and various system utilities and what is the difference between a “desktop environment” and a “window manager”.