The Wayback Machine - https://web.archive.org/web/20240917120134/https://www.geeksforgeeks.org/the-linux-kernel/
Open In App

Linux Kernel

Last Updated : 18 Apr, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Linux Kernel is the heart of Linux operating systems. It is an open-source (source code that can be used by anyone freely) software that is most popular and widely used in the industry as well as on a personal use basis. Who created Linux and why? Linux was created by Linus Torvalds in 1991 as a hobby project. Since then, many of the users have contributed to its growth and development of it. Before Jumping directly to the main topic “Linux Kernel” one must know a few concepts (prerequisites) to better understand the Linux Kernel.

What is Linux Operating System and Kernel?

An operating system (OS) is a software system that manages the computer that provides some services for computer programs and manages computer hardware and software. Basically, it is a communication or resource allocation between computer hardware and applications. It provides some services like managing input and output devices, managing file systems, providing UI (User Interface) and also managing computer memory. It also governs and executes all the programs. 

Linux operating System also consists of various components for example system libraries, user-space utilities, Linux kernel, and applications. The kernel is the core component of an operating system. This provides a platform for programs and various services to run on top of it. The Linux kernel is modifiable according to the user’s needs. Overall, the Linux Operating System and Linux kernel together provide a strong and user-friendly platform.  

In a General-Purpose Computer running many processes simultaneously, we need a middle layer to manage the distribution of the computer’s hardware resources efficiently and fairly among all the various processes running on the computer. This middle layer is referred to as the kernel. The kernel virtualizes the computer’s common hardware resources to provide each process with its own virtual resources. This makes the process seem as if it is the sole process running on the machine. The kernel is also responsible for preventing and mitigating conflicts between different processes. This is schematically represented below: 

Schematical representation of Kernel working

Schematical representation of Kernel working

Figure: Virtual Resources for each Process

The Core Subsystems of the Linux Kernel are as follows:

  1. The Process Scheduler
  2. The Memory Management Unit (MMU)
  3. The Virtual File System (VFS)
  4. The Networking Unit
  5. Inter-Process Communication Unit
 Core Subsystems of the Linux Kernel

 Core Subsystems of the Linux Kernel 

Figure: The Linux Kernel for the purpose of this article we will only be focusing on the 1st three important subsystems of the Linux Kernel. The basic functioning of each of the 1st three subsystems is elaborated below:

  • The Process Scheduler: This kernel subsystem is responsible for fairly distributing the CPU time among all the processes running on the system simultaneously.
  • The Memory Management Unit: This kernel sub-unit is responsible for proper distribution of the memory resources among the various processes running on the system. The MMU does more than just simply provide separate virtual address spaces for each of the processes.
  • The Virtual File System: This subsystem is responsible for providing a unified interface to access stored data across different filesystems and physical storage media.

Some Basic Commands:

Some Basic Commands we need to know while working on Linux Kernel. 

  • `ls` : Use to list all the files and directories in a particular location specified by us.

Syntax: 

ls [OPTION] [FILE]

Example:

In this example we are going to list all the file and directories in our current location , we have one directory name `snap`.

 Here in second time we use `a` option (to see all the hidden files).

 In third time we specified a `snap` directory.

`ls` command

ls command

  • `mkdir` : In this we will create a new directory.

Syntax:  

mkdir [OPTION] DIRECTORY

Example:

In this we will make a directory name `test` and to check it we can use command `ls`.

`mkdir` command

mkdir command

  • `cat` : In this we will print the context inside a text file on terminal.

Syntax: 

cat [OPTION] [FILE]

Example: 

Printing a content inside a text file name `example`.

`cat` command

cat command

  • `pwd` : In this we will get to know the name and path of the current working directory.

Syntax: 

pwd

Example:

`pwd` command

pwd command

Conclusion:

The most powerful and versatile component of the Linux Operating System is known as the Linux kernel. The Kernel has provided a wide range of features, for example, memory management, filesystem management, process management, device drive management and networking support. After understanding all this one can conclude that customizability and extensibility have made it the most popular choice for a computer system.


Previous Article
Next Article

Similar Reads

Ksplice Install Linux Kernel Updates without Reboot
The Ksplice software allows changes/patches to be made to the running kernel without the need for any reboot. Important patches are made while the system is still running and there is no need to restart the computer. The software was acquired by Oracle in 2011 and is also known as the Oracle Ksplice. Why do systems need to reboot in the first place
7 min read
How Linux Kernel Boots?
Many processes are running in the background when we press the system's power button. It is very important to learn the booting process to understand the working of any operating system. Knowing how the kernel boots is a must to solve the booting error. It is a very interesting topic to learn, let us start with the basics. A simplified read of the
6 min read
Linux Loadable Kernel Module
If you want to add code to a Linux kit, the basic way to do that is to add source files to the kernel source tree and assemble the kernel. In fact, the process of setting up the kernel consists mainly of selecting which files to upload to the kernel will be merged. But you can also add code to the Linux kit while it is running. A piece of code you
7 min read
How to Create Virtual Machines in Linux Using KVM (Kernel-based Virtual Machine)?
In this tutorial, we are going to see how we can create a virtual machine in Linux using a Kernel-based Virtual Machine. Virtual machines are based on computer architectures and provide the functionality of a physical computer but first, we need to understand what is a kernel-based virtual machine. The Information Technology field is complex it nee
5 min read
Loadable Kernel Module - Linux Device Driver Development
For Linux device drivers, we can use only two languages: Assembler and C. Assembler implements the main parts of the Linux kernel, while C implements the architecture-dependent parts. Uploaded kernel modules are often referred to as kernel modules or modules, but those are misleading names because there are so many types of modules in the world, an
4 min read
How to Upgrade Linux Kernel on CentOS 7
The kernel is a central component of an operating system that manages the operations of the computer and hardware. It basically manages operations of memory and CPU time. It is a core component of an operating system. Kernel acts as a bridge between applications and data processing performed at the hardware level using inter-process communication a
2 min read
How to Compile Linux Kernel on CentOS 7
The kernel is the core of a computer's operating system that has complete control over the system and provides basic services for all other parts. The default kernel available in any distribution cannot be customized. We cannot enable or disable any feature on it. Running a custom-compiled Linux Kernel becomes very helpful in cases when the hardwar
3 min read
How to Check If a Linux Kernel Supports My System Devices
Finding the right drivers and information about them is very crucial if we want to check their compatibility with our system. There are a lot of techniques and commands that you can use to gather information about your system devices. The Linux distribution that we will be using in this article will be CentOS. You can choose any system of your choi
3 min read
Is Linux a Kernel or an Operating System?
Linux is a widely used open-source Unix-like operating system. This is what most of us know. However, Linux is not an operating system. At least not technically. So, in this article, we will discuss if we should call Linux a kernel or an operating system. Kernel and Operating System:Before moving forward with this topic, we should know the kernel a
4 min read
5 Tips to Make a Career as a Linux Kernel Developer
As we all know that Linux kernel is the heart of the Operating System that allows the real Operating System to function. Indeed, the Linux kernel is the most renowned open-source project ever created. Most developers around the world tend to work on GUI (graphical user interface) applications or libraries which are usually written in higher-level l
4 min read
How to Check Kernel Version in Linux
The kernel in the Linux Operating System is the core brain component of OS. Kernel in Linux OS is mainly a bridge between the hardware and the software layers. All the necessary services and the functionalities of the OS and the application are been provided by Kernel. The kernel has its version which differs according to the system. Knowing this v
5 min read
How to View Kernel Messages in Linux | dmesg Command
The Linux kernel is considered as the one of the core components for the Linux operating system. It helps in establishing the communication between the hardware and managed system resources. To monitor and troubleshoot the kernel's interactions with the hardware and software components, the dmesg command comes as well-handy. In this article, we wil
8 min read
Compile our own Android Kernel in 5 Simple Steps
The Android kernel helps the applications to communicate with the hardware components of the device. For example: Most of us are familiar with game mode. What it does is instructs the processor and the graphics processing unit to run at their maximum frequencies. Another example is power saver mode. It instructs the processor and the graphics proce
3 min read
What is Terminal, Console, Shell and Kernel?
As a fresher, while learning Linux we get confused with the actual meaning of the terms like-Terminal, Console, Shell, and Kernel. Sometimes we mix up their usage which is technically incorrect so having a clear grasp of what every word actually means and how and where they should be used is very important. 1. Terminal:For those having Linux OS, wh
4 min read
User mode and Kernel mode Switching
In it's life span a process executes in user mode and kernel mode. The User mode is normal mode where the process has limited access. While the Kernel mode is the privileged mode where the process has unrestricted access to system resources like hardware, memory, etc. A process can access I/O Hardware registers to program it, can execute OS kernel
4 min read
Power-of-Two Free Lists Allocators | Kernel Memory Allocators
The Power of Two Free Lists is an algorithm for Kernel Memory Allocation. It is used frequently to implement malloc() and free() in the user-level C library. This approach uses a set of free lists. Each list stores buffers of a particular size and all the sizes are powers of two. For example, consider the figure below there are six free lists, stor
4 min read
What is Reentrant Kernel?
Reentrant Kernel: In kernel mode, a reentrant kernel allows processes (or, more precisely, their corresponding kernel threads) to give up the CPU. They have no effect on other processes entering kernel mode. Multiple processor systems may be scheduled together in the case of single-processor systems. Example: A disc read is an example of this. When
2 min read
How to connect a Local Jupyterlab to a Remote Kernel?
In the era of emerging technologies like Data Analytics, Data Science, Machine Learning, etc., we have seen and come across scenarios, demanding powerful tools that can accelerate and streamline the process of work. One such useful tool that we encountered is JupyterLab. In this article, we will explore the various concepts related to JupyterLab No
7 min read
Difference Between Hypervisor and Exo-Kernel
In the context of virtualization and operating system design, it is important to recognize significant dissimilarities between hypervisors and exo-kernels. Both are vital in the administration of hardware resources as well as virtual environments, although they work at different layers and have unique styles of handling resources. Hypervisors are t
4 min read
Difference Between User Mode and Kernel Mode
User mode and kernel mode are two working states inside a laptop's working system that determine the level of access and control, a technique can have over machine resources. Understanding the differences among these modes is critical to knowing how modern working systems manage safety and resource allocation. What is User Mode?When a Program is bo
4 min read
Difference Between Arch Linux and Kali Linux
Arch Linux is an open-source Linux-based Operating System that is freely available for use. It belongs to the Pacman-based Linux family. It is a light weighted OS for daily use and could even be used by professionals. It was first released in March 2002. It is a beginner-friendly Linux Operating System. Features of Arch Linux: Minimalist approach:
4 min read
Neofetch In Linux – Snap cool screenshots of your Linux
Neofetch is a fancy, highly customizable, and aesthetic command-line system information screenshot utility tool. Written in the Bash scripting language, it works inside a terminal window, on triggering up the command it by default displays the operating system, software, and hardware of your system on the right side of the column alongside an ASCII
4 min read
Exodus - Copy Linux Binaries From One Linux System
Exodus is an easy-to-implement program, that is used for bundling dependencies, and also helps to effectively copy Linux ELF binaries from one to another machine securely, and this is very handy when you don't have root access, also if there are issues in the availability of the packages in the Linux distribution, Commonly Server oriented distribut
3 min read
Basic CentOS Linux Commands in linux
CentOS is a free and open-source operating system that aims to provide a stable reliable, and community-supported platform for servers and other enterprise applications. In this article, we will be covering CentOS Linux basics commands and functions of CentOS and also we will look into the advanced commands. These CentOS commands allow you to manag
3 min read
Linux on Azure – Linux Distributions
Azure, the cloud computing platform from Microsoft, offers a playground for deploying and managing your Linux-based operating systems. Think of it as a canvas of boundless resources, security, and scalability, painted onto which you can unleash the boundless creativity and flexibility of Linux. This powerful synergy unlocks a world of opportunity,
10 min read
Linux Virtualization : Resource throttling using cgroups
In Linux Virtualization – Chroot Jail article, we discussed about kernel namespaces and process jailing. To understand this article, you may not need to read the earlier one, but I strongly suggest that you go through it once before diving into resource throttling. It should help tremendously in understanding what's going on. What are cgroups? cgro
9 min read
Kali Linux - Password Cracking Tool
Password cracking is a mechanism that is used in most of the parts of hacking. Exploitation uses it to exploit the applications by cracking their administrator or other account passwords, Information Gathering uses it when we have to get the social media or other accounts of the C.E.O. or other employees of the target organization, Wifi Hacking use
5 min read
select command in Linux with examples
select command in Linux is used to create a numbered menu from which a user can select an option. If the user enters a valid option then it executes the set of command written in select block and then ask again to enter a number, if a wrong option is entered it does nothing. If user enters nothing and simply press 'enter' the option menu gets print
1 min read
XSS-Freak - XSS Scanner Fully Written in Kali Linux
XSS or Cross-Site Scripting is the most emerging security flaw in Web Applications. When the arbitrary or malicious JavaScript is executed by the web application then it is said to be an XSS Vulnerable Website. There are various XSS Scanners through which we can detect the XSS on the target domain. XSS-Freak is an XSS Scanner developed in the Pytho
3 min read
Tracing memory usage in Linux
Memory is a critical resource in computing because its usage affects the performance and stability of a system. It's necessary to trace the memory usage of the system in order to determine the program that consumes all CPU resources or the program that is responsible for slowing down the activities of the CPU. Tracing memory usage also becomes nece
3 min read