Skip to content

How does the Linux kernel work?

Updated Nov 30, 20263 min readBased on official documentation
How does the Linux kernel work?

In short

The Linux kernel is the core layer of the Linux operating system. It sits between hardware and programs, manages memory, processes, devices and files, and gives applications a controlled way to use the machine. This page explains its main jobs and the administrator-facing interfaces the kernel documentation describes.

What the kernel does

The kernel is the part of the operating system that runs with full control of the hardware. User programs run in a restricted mode and ask the kernel for anything privileged, such as reading a disk, opening a network socket or starting a new process. The request arrives through a system call, a fixed entry point the kernel exposes to user space.

The kernel covers several jobs at once. It schedules CPU time between tasks, manages virtual memory so each process sees its own address space, talks to drivers for devices, and hosts the filesystem and networking stacks. Because all of this runs in one privileged core, a bug in the kernel can affect the whole machine, which is one reason the project documents its debugging and reporting paths in such detail.

Interfaces you use as an administrator

The kernel does not only serve programs. It also publishes its state as files. The two main virtual filesystems are procfs, mounted at /proc, and sysfs, mounted at /sys. They look like ordinary directories, but the contents are generated by the kernel on each read. The administrator guide points to these as the main place to inspect and tune a running system. Documentation for /proc/sys describes the tunable values exposed there, and the rules for sysfs describe how to read device and driver information safely.

The guide also lists the ABI description, which defines what user space can rely on across kernel versions. This matters when you write tools that parse kernel output: stable interfaces are documented, while other details may change between releases.

Boot and command-line parameters

When the machine starts, the boot loader passes a command line to the kernel. Parameters on that line control early behavior, such as options for drivers or memory. The kernel's command-line parameters page lists them. The EFI boot stub explains how the kernel can be started directly by UEFI firmware, and the initial RAM disk page explains how a small temporary filesystem is loaded before the real root filesystem is mounted.

If boot stops with a message about no working init, the guide has a dedicated page that walks through the common causes, such as a wrong root device or a missing init program.

Core subsystems and resource control

The guide groups several core features under one heading. Control Groups version 2 lets you limit and account for CPU, memory and I/O per group of processes. Namespaces isolate views of resources such as process IDs and mounts, which is the basis for many container tools. The memory management and power management sections describe how the kernel reclaims memory and moves devices into lower-power states.

These features are usually configured through the interfaces above, not by changing kernel code. Read the matching page before you change a value, because some settings affect every process on the machine.

Finding and reporting problems

For failures, the guide offers a path from symptoms to cause. Kernel oops and panic messages can be logged through ramoops or pstore so they survive a reboot. Dynamic debug lets you turn on extra messages for chosen code paths. Bisecting a regression means building kernels between a known good and a known bad version to find the change that broke things. Kdump captures a memory image after a crash so you can analyze it later.

When you report a bug, follow the reporting pages in the guide. They describe what information the maintainers need, and a "tainted" kernel flag shows when proprietary or out-of-tree code has been loaded, which can change how the report is handled.

Common mistakes

Beginners often edit /proc or /sys values and forget that the change lasts only until reboot. Persistent settings belong in configuration files loaded at boot. Another frequent mistake is testing a risky parameter on a production machine. Use a virtual machine or a spare system first, and keep a way to reach the console in case networking breaks.

FAQ

Is the Linux kernel the same as the Linux operating system?

Not quite. The kernel is the core that manages hardware and resources. A full Linux distribution adds libraries, shells, tools and init systems around it.

Where can I change kernel settings without rebuilding it?

Many runtime settings are exposed under /proc/sys and /sys. Changes there last until reboot unless you make them persistent through boot parameters or configuration files.

What is the difference between /proc and /sys?

Both are virtual filesystems generated by the kernel. The guide describes /proc for process and system information and /sys for device and driver information, with sysfs rules documented separately.

Where should I start if my system fails to boot?

Check the kernel command-line parameters and the initial RAM disk documentation first. The guide also has a page explaining the no working init message.

Sources

This page is based on the official documentation below. Read it for full detail.

Linux kernel — official documentation ↗

Linux kernel in the news

blozhikDeveloper news from across the web, explained. Every story links to its original sources.