Skip to main content

What Is The Linux Kernel? How To Check Your Version

INTRODUCTION.


There are so many Linux distributions but the one thing they all have in common is the Linux Kernel. A lot of people talk about the Linux kernel but most of them don't really know what it does.
Each operating system  uses a kernel without which you can't have a computer that actually works. You may see and interact with a lot of different software but it is the kernel underneath that does much of the less glamorous work.
In this article, we're going to look at Linux kernel and why it is needed.

What Exactly is the Linux Kernel?

The Linux Kernel is the main component of a Linux operating System and is the core interface between a computer's hardware and its processes. It communicates between the two,managing resources as efficiently as possible.

It is technically incorrect to refer to Linux as a complete operating system. Linux actually refers specifically to the kernel which was named after its founder Linus Torvalds. It is named the kernel because, just like a seed inside a hard shell, the kernel exists inside the operating system and controls all the major functions of the hardware whether its on a laptop, server or phone.

It powers most of the world's smartphones and appears in all kinds of wearable devices including cameras and wearables


 
What Does The Kernel Do?

The Kernel has 4 functions:
  1. Process Management - It determines which processes can use the Central Processing Unit (CPU) at what time and for how long. The kernel tries to optimize the usage of the processor so that it can complete tasks as quickly as possible
  2. Memory Management - It keeps track of how much memory is used to store what and where. It is therefore highly involved in resource management because it has to make sure that there is enough memory available for an application to run. It also places an application in the right location in memory. Failures can lead to deadlocks. A deadlock is a situation where an entire system or processes are halted because one application needs a resource that another one is using.
  3. Device Drivers - It acts as a mediator or interpreter between the hardware and processes in a computer. The kernel serves as the bridge between your computer hardware and the software you wish to run. It talks to the hardware via the drivers that are included in the kernel or are installed later in the form of modules. This way, when an application wants to do something, it can submit a request to the kernel and the kernel will use the available system resources to actually complete the task.
  4. System calls and Security - It receives requests for service from the processes
Simplified Structure of the Linux Kernel
ScotXW / CC BY-SA

If the kernel is implemented properly, it is invisible to the user and works in its own little world known as the kernel space. This is where it allocates memory and keeps track of where everything is stored.
There is also the user space which is what the user sees - like web browsers and files. These applications interact with the kernel through a System Call Interface SCI.

Kernel and the Operating System (OS)

To get a better understanding of the kernel, think of a Linux machine as having 3 layers
  1. The Linux kernel - It is the core of the OS and resides in the memory where it tells the CPU what to do.
  2. The Hardware - This is the physical machine and it is made up of the processor or CPU (Central Processing Unit), input/output I/O devices such as storage and graphics and the memory (RAM).
  3. The user processes - These make up the user space and are the running programs that the kernel manages. The kernel allows these processes and servers to communicate with each other in what is known as inter-process communication or IPC).
How To Check Your Linux Kernel Version.

The kernel remains under active development so new Linux versions come out all the time. You can check which release is on your machine using this command. It works across any version of Linux.

 uname -r  

or uname -sr.
I am currently running Linux Kernel Version 5.3.0-53-generic (to be updated).

Let's break down what this means
  • 5 refers to the kernel version
  • 3 refers to the current major version
  • 0 refers to the current minor version
  • 53 refers to the bug fixes and patches applied to this release.
The last bit will be specific to the distribution you are running. This string indicates that I am running a generic version of Ubuntu 18.04.

Updating the Linux Kernel
The best way to update your Linux Kernel version is by upgrading to the latest version of your preferred Linux-based operating System.

If you found this article helpful please let me know in the comments below and also include which linux kernel version you're currently running.

Comments

  1. this is nice I did bot know what version am running on

    ReplyDelete
  2. Very educative Nuff. Staying tuned for more.

    ReplyDelete

Post a Comment

Your input is valued. Please type something....