- What is the Linux kernel?
- What the kernel does
- Where the kernel fits within the OS
- The Linux Kernel documentation¶
- Working with the development community¶
- Internal API manuals¶
- Development tools and processes¶
- User-oriented documentation¶
- Firmware-related documentation¶
- Architecture-specific documentation¶
- Other documentation¶
- The Linux Kernel documentation¶
- Working with the development community¶
- Internal API manuals¶
- Development tools and processes¶
- User-oriented documentation¶
- Firmware-related documentation¶
- Architecture-specific documentation¶
- Other documentation¶
What is the Linux kernel?
The Linux® kernel is the main component of a Linux operating system (OS) and is the core interface between a computer’s hardware and its processes. It communicates between the 2, managing resources as efficiently as possible.
The kernel is so named because—like a seed inside a hard shell—it exists within the OS and controls all the major functions of the hardware, whether it’s a phone, laptop, server, or any other kind of computer.
What the kernel does
- Memory management: Keep track of how much memory is used to store what, and where
- Process management: Determine which processes can use the central processing unit (CPU), when, and for how long
- Device drivers: Act as mediator/interpreter between the hardware and processes
- System calls and security: Receive requests for service from the processes
The kernel, if implemented properly, is invisible to the user, working in its own little world known as kernel space, where it allocates memory and keeps track of where everything is stored. What the user sees—like web browsers and files—are known as the user space. These applications interact with the kernel through a system call interface (SCI).
Think about it like this: The kernel is a busy personal assistant for a powerful executive (the hardware). It’s the assistant’s job to relay messages and requests (processes) from employees and the public (users) to the executive, to remember what is stored where (memory), and to determine who has access to the executive at any given time and for how long.
Where the kernel fits within the OS
To put the kernel in context, you can think of a Linux machine as having 3 layers:
- The hardware: The physical machine—the bottom or base of the system, made up of memory (RAM) and the processor or central processing unit (CPU), as well as input/output (I/O) devices such as storage, networking, and graphics. The CPU performs computations and reads from, and writes to, memory.
- The Linux kernel: The core of the OS. (See? It’s right in the middle.) It’s software residing in memory that tells the CPU what to do.
- User processes: These are the running programs that the kernel manages. User processes are what collectively make up user space. User processes are also known as just processes. The kernel also allows these processes and servers to communicate with each other (known as inter-process communication, or IPC).
Code executed by the system runs on CPUs in 1 of 2 modes: kernel mode or user mode. Code running in the kernel mode has unrestricted access to the hardware, while user mode restricts access to the CPU and memory to the SCI. A similar separation exists for memory (kernel space and user space). These 2 small details form the base for some complicated operations like privilege separation for security, building containers, and virtual machines.
This also means that if a process fails in user mode, the damage is limited and can be recovered by the kernel. However, because of its access to memory and the processor, a kernel process crash can crash the entire system. Since there are safeguards in place and permissions required to cross boundaries, user process crashes usually can’t cause too many problems.
Also, because the Linux kernel can continue to work during live patching, there’s no downtime while patches are applied for security fixes.
The Linux Kernel documentation¶
This is the top level of the kernel’s documentation tree. Kernel documentation, like the kernel itself, is very much a work in progress; that is especially true as we work to integrate our many scattered documents into a coherent whole. Please note that improvements to the documentation are welcome; join the linux-doc list at vger.kernel.org if you want to help out.
Working with the development community¶
The essential guides for interacting with the kernel’s development community and getting your work upstream.
Internal API manuals¶
Manuals for use by developers working to interface with the rest of the kernel.
Development tools and processes¶
Various other manuals with useful information for all kernel developers.
User-oriented documentation¶
The following manuals are written for users of the kernel — those who are trying to get it to work optimally on a given system and application developers seeking information on the kernel’s user-space APIs.
See also: the Linux man pages, which are kept separately from the kernel’s own documentation.
Firmware-related documentation¶
The following holds information on the kernel’s expectations regarding the platform firmwares.
Architecture-specific documentation¶
- CPU Architectures
- ARC architecture
- ARM Architecture
- ARM64 Architecture
- IA-64 Architecture
- LoongArch Architecture
- m68k Architecture
- MIPS-specific Documentation
- Nios II Specific Documentation
- OpenRISC Architecture
- PA-RISC Architecture
- powerpc
- RISC-V architecture
- s390 Architecture
- SuperH Interfaces Guide
- Sparc Architecture
- x86-specific Documentation
- Xtensa Architecture
Other documentation¶
There are several unsorted documents that don’t seem to fit on other parts of the documentation body, or may require some adjustments and/or conversion to ReStructured Text format, or are simply too old.
The Linux Kernel documentation¶
This is the top level of the kernel’s documentation tree. Kernel documentation, like the kernel itself, is very much a work in progress; that is especially true as we work to integrate our many scattered documents into a coherent whole. Please note that improvements to the documentation are welcome; join the linux-doc list at vger.kernel.org if you want to help out.
Working with the development community¶
The essential guides for interacting with the kernel’s development community and getting your work upstream.
Internal API manuals¶
Manuals for use by developers working to interface with the rest of the kernel.
Development tools and processes¶
Various other manuals with useful information for all kernel developers.
User-oriented documentation¶
The following manuals are written for users of the kernel — those who are trying to get it to work optimally on a given system and application developers seeking information on the kernel’s user-space APIs.
See also: the Linux man pages, which are kept separately from the kernel’s own documentation.
Firmware-related documentation¶
The following holds information on the kernel’s expectations regarding the platform firmwares.
Architecture-specific documentation¶
- CPU Architectures
- ARC architecture
- ARM Architecture
- ARM64 Architecture
- IA-64 Architecture
- LoongArch Architecture
- m68k Architecture
- MIPS-specific Documentation
- Nios II Specific Documentation
- OpenRISC Architecture
- PA-RISC Architecture
- powerpc
- RISC-V architecture
- s390 Architecture
- SuperH Interfaces Guide
- Sparc Architecture
- x86-specific Documentation
- Xtensa Architecture
Other documentation¶
There are several unsorted documents that don’t seem to fit on other parts of the documentation body, or may require some adjustments and/or conversion to ReStructured Text format, or are simply too old.