Search This Blog

Saturday, November 8, 2014

What is a GNU/Linux Distribution

GNU/Linux Distribution

A GNU/Linux distribution is a collection of software containing both GNU and Linux components which together combine to deliver a GNU/Linux System. A Linux Distribution contains an Installer or instructions to install which helps installing the System to computer.

This is the most simple definition of a GNU/Linux Operating System. I will describe more details in following section. With Linux comes freedom, the freedom to modify, use or distribute the Kernel for any purpose with one caveat, One needs to make sure the modifications one makes are also available to others for use and distribute like the original software. Complete information is contained in the GPL-V2 license document. This freedom gave rise to different Distributions of GNU/Linux because different people like to do things differently.

I will detail the deciding factors for a distribution which become distinguishing factors as well for different distributions. However lets take a look how we manage the licenses for the complete system. Then we can dive into the technical pieces.

We all know by now that GNU/Linux is free to use and distribute. The kernel itself is licensed under GPL-V2 and it is going to stay the same. The components of the GNU/Linux System other than the kernel itself are licensed under different licenses. All software contains a license file. However across the GNU/Linux System license compatibility is maintained to avoid license conflicts. Since the Kernel itself is GPL-V2. Most of the software shipped by most distributions are GPL compatible.

For a complete list one could visit this page and read all information.

Important components of a GNU/Linux System

OK it is time to take a look at the components of a GNU/Linux System. This is a high level description sufficient enough to give you a basic understanding  of a GNU/Linux System.

  1. The Boot Loader
  2. The X Windowing System
  3. The Display Manager
  4. The Window Manager
  5. Desktop environment
  6. Most Important Kernel
  7. Init System.

The above structure looks quite modular and easily understandable. The breakdown is basically a high level overview based on the events that happen in a typical Operating System and how GNU/Linux Handles them.

There are various tasks which need to be complete in order to boot into a GNU/Linux System and subsequently use them.

GNU/Linux System Components

The above diagram shows basic components of the GNU/Linux System. You can see kernel is central to all this.

I have not shown Init System because that is kind of too technical to represent in a diagram. I will explain what each of these is for better understanding.
  1. Boot Loader :-

Boot Loader is the first program after BIOS to execute in a computer boot up process. This tells the computer where to look for the operating system, in case of a multi-boot system displays a list and one can select a particular one.
In addition tot his Boot Loader lets you pass custom kernel commands, for example the nomodeset option to boot into a safe graphics mode in case your Graphics Card has issues.
Examples of boot loaders  GRUB, LILO

2. X Windowing System, or  X Server.

The X Windowing System or X Server is a Display Server, whose job is to provide the display service which is utilized by The Display Mangers and then Window Managers. X Server is the heart of the Linux Graphics stack. X is responsible for everything DISPLAY.

X Server has dominated the Display on Linux for three decades and even today X is our only solution, There are alternative solutions like Wayland and Mir being developed at Intel and Canonical respectively. It may take a few more years before X is complete replaced by the alternatives.

3. Display Manager 

Display Manager is a program which helps to swiftly move from the X Windowing System and into the Desktop Environment. It kind of presents a Graphical Login Screen to the end user. The display manager allows us to Select from the installed desktop environments in case we have many installed. It also allows for using different credentials. Hence a very important part as for as usability is concerned.

A few examples.  GNOME display manager,  GDM KDE display Manager KDM, Mint Display manager MDM. SLIM, LIGHTDM etc..

Generally most Desktop Environments have their Own Display Managers while there are many which are completely Independent like SDDM.

4. Window Manager

A Window manager is a program which manages the windows in a desktop environment. It is responsible for window movement and management. It also takes care of any animations in case of KDE KWIN.

Other notable window managers are Mutter, Metacity, twm,fluxbox, openbox,compiz etc..

5. Desktop environment

A desktop environment is a complete software collection which works together to provide a desktop experience to a user. It mostly is based on a single software framework. Applications provided by the software suite work very well together. It has the window manager, file manager etc... All the programs that work well together.

A typical example is the GNOME desktop environment and the GNOME software suite. That is what I am using at the moment, it provides me with everything that I need to work with my computer. 

Other examples are KDE, UNITY, XFCE CINNAMON MATE LXDE etc..... 

One could combine display manager, window manager file manager etc.. to form a custom desktop environment. We could combine Openbox with a display manager  file manager etc.. to form a full desktop environment like CRUNCHBANG GNU/LINUX does.

6. Kernel. 

The Linux Kernel is the heart of the system and does all the hardware management etc. Resource allocation, process scheduling etc... 

7. Init System,

This is something I have not shown in the diagram because it is a little complex to put together in one block.  So Init system is another very Interesting and Important component of any GNU/Linux System.  It job is to make sure whatever is required by the subsequent processes be initialized at boot and then managed later on while the machine is powered on.

I have explained all the system components, However we need to take a look what happens when the machine boots.

When it boots the boot loader calls on the selected OS/Kernel to boot, there is a specific set of processes and services that need to be started in a specific sequence to make sure that the system boots correctly. This is what is managed by an Init system. 

If you have a network card that needs to fetch IP address using dhcp, we need to ensure that the DHCP process is automatically started while the boot happens. Also we need to start the X window System automatically and then start the Display Manager automatically. This what is managed by the Init system. It takes care of starting all required processes and services required to be started to ensure proper functionality. It also provides  way to stop/start enable or disable services at run time.

There is a lot more but this should be sufficient as a basic introductions

This is just an overview. Different init systems use different approaches to provide this functionality.

Examples for Init Systems.  

sysvinit / BSD init OpenRC Systemd etc..

So if we look at  we have so many distributions. WHY ?

Considering the freedom GNU/Linux and open source provides, It is quite evident that people would use the freedom to their best use. That is what has led to the creation if so many GNU/Linux Distribution. There are so many of them because there are so many different people with so many different Ideas for doing things.

That is it for today, In my next post I will address WHY SO MANY DISTRIBUTIONS?

Please do comment and send your feedback to me