loader

After we decided to use Linux as our operating system, there is one more thing to decide. Choosing a suitable distro for our service .but what exactly a distribution or a distro – in short form – is and which one is a better choice for us? A hugely exciting list of distros with rankings on distrowatch.com is an excellent reference for Linux users. Some users think distributions are all the same and only different in a few things, but it is entirely wrong.

What is a Linux Distribution (distro)?

A Linux distribution is an open-source operating system that includes a Linux kernel, package manager, and additional software. Some of them have display service tools to be used as a desktop. That is right! Distribution is the operating system, and Linux is the kernel! Let us explain it a little more.

As we mentioned in the previous post, Linux architecture includes four layers. The kernel is the most critical layer and the operating system’s core, which is responsible for system calls and security, process management, device drivers, Memory management, and interaction with hardware. Users can interact with the kernel through applications and shells.

Linux Architecture
Linux Architecture

Now we refer to CHRISTINE BRESNAHAN‘s example in the LPIC1 SYBEX  book, she likened the operating system to a car. by this assumption, the kernel is the car engine so distribution can be considered as a manufacturer like BMW or Tesla. as we know every manufacturer has many production models and every model has its own features and features are often different between models and manufacturers.so if you rent a car, you have to spend some time seeing car controls and figure out how to use them before driving the car. It’s also true in Linux distributions, even though they all have Linux kernel (car engine) in their core, they are different in features which can include command line differences that are very important.

Package Management

Distributions usually differ by Package management. For a better understanding of package managers and what exactly they do, first, we must know about packages.

What is a Package?

Linux kernel does nothing on its own. so for implementing a server we should download and install applications and service programs such as web servers and databases and other applications. Every application has a source code that needs to be compiled and then, installed to be executable in Linux. But as we know different application programs’ source code, is written by different programming languages which need different compiling requirements. This process is hard and time-consuming.  Linux distributions create packages to simplify the installation process, Even though in some situations we have to install programs by compiling their source codes.

A package is a compressed archived binary executable (already compiled) application file, that consists of most of the files needed to run the applications. Some applications are dependent on other applications and libraries to install and run. so packages also have dependency information of applications. It became so easier to download and install a package than to compile source codes.

Package Manager

A package manager is an application that is used for downloading, installing, removing, and searching packages. Linux has a local database that keeps every installed package information beside exact files and file locations required for applications, called package management database. The package manager modifies this database’s information after installing, removing, updating, packages, and tracking the database for searching information.

Every Distribution, created its specific package management system but two of them are considered standards :

1-Red hat package management (RPM)

2-Debian package management (APT)

So Distributions that use RPM, are called red hat-based such as Fedora and Centos, and those which use APT, are called Debian-based such as Debian and Ubuntu.

You can pick your distro based on which package management standard you choose.

How do Package Managers work?

All Linux distributions have package repositories that keep software packages usually for the latest versions. For preventing traffic congestion in repositories and also having some redundancies, there are several repositories all over the world.

Every repository has a Metadata file that keeps the packages’ name, version, description, and repository name and address. package manager at first gets repository metadata information and makes a local metadata cache and every time we use the package manager update command, it gets metadata information again and updates the local cache.

When we want to install an application, the package manager refers to its local cache, and if it finds the package name on the local cache it will use the internet connection to download the package from the repository and install it. If the application has any dependencies, the package manager will also download and install dependencies, which makes using package management easier and more enjoyable.   

We will get to know the Linux shells and their commands in the next post.

3 Comment

  1. Pingback: Shell Surfing - SMEnode
  2. Pingback: LPIC1-001- Windows Or Linux? - SMEnode
  3. Pingback: LPIC1-005-Shell Basic commands-Part 1 - SMEnode

Leave a Reply

Your email address will not be published. Required fields are marked *