kids encyclopedia robot

Linux kernel facts for kids

Kids Encyclopedia Facts
Quick facts for kids
Linux Kernel
Tux
Tux the penguin, mascot of Linux
Linux 6.1.0-27 kernel (running on Debian Bookworm).png
Linux kernel 6.1.0 kernel booting, under Debian
Original author(s) Linus Torvalds
Developer(s) Community contributors
Linus Torvalds
Initial release 0.02 (5 October 1991; 33 years ago (1991-10-05))
Stable release
6.16 Edit this on Wikidata / 27 July 2025
Preview release
Lua error in Module:Wd at line 1575: attempt to index field 'wikibase' (a nil value).
Written in C (with GNU extensions; C11 (gnu11) since 5.18, C89 before),
Assembly language,
Rust, others
Available in English
License GPL-2.0-only with Linux-syscall-note

The Linux kernel is a special computer program that is the core of many operating systems. It's like the brain of a computer, managing everything from the hardware to the software you use. It's also a free and open-source program, meaning anyone can use it, study it, change it, and share it.

Linus Torvalds created the Linux kernel in 1991. Soon after, it became the main part of the GNU operating system, which was designed to be a free alternative to Unix. Today, the Linux kernel is used in many different operating systems, often simply called Linux. Even Android, which runs on your phone or tablet, uses a special version of the Linux kernel!

Most of the Linux kernel is written in a programming language called C. It also uses Assembly language for some parts that need to be super fast. The kernel is designed in a "modular" way, meaning it's built from smaller pieces that can be added or removed as needed.

The Linux kernel is available under the GNU General Public License version 2, which is a special license that ensures it stays free and open for everyone.

How Linux Started

LinuxCon Europe Linus Torvalds 03 (cropped)
Linus Torvalds at the LinuxCon Europe 2014

In 1991, Linus Torvalds was a computer science student at the University of Helsinki. He started working on an operating system as a fun side project. He was inspired by another operating system called UNIX.

On August 25, 1991, Linus shared his idea online in a newsgroup called comp.os.minix. He wrote:

I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since April, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things).
I've currently ported bash(1.08) and gcc(1.40), and things seem to work. This implies that I'll get something practical within a few months [...]
Yes - it's free of any minix code, and it has a multi-threaded fs. It is NOT protable [sic] (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have :-(.

On September 17, 1991, Linus released the very first version, 0.01, of Linux. It wasn't even ready to run on its own yet!

Then, on October 5, 1991, he announced the first "official" version, 0.02. He said it was finally usable, even if still very new.

Many developers, including those from the MINIX community, quickly started helping Linus. The GNU Project needed a kernel for its free UNIX replacement, and they decided to use the Linux kernel. This helped Linux grow even faster.

Linus kept the version number below 1.0 to show it wasn't fully ready for everyone to use. Version 0.11, released in December 1991, was the first version that could compile itself on a computer running Linux.

In February 1992, Linus changed the license for Linux to the GNU General Public License version 2 (GPLv2). This license allowed people to share and even sell Linux, as long as they also shared the source code. Unlike Unix, all parts of Linux became freely available.

Early on, Linux became popular because programmers and testers worldwide helped improve it. It could also run software made for Unix, which was a big plus.

Linux kernel ubiquity
The Linux kernel supports various hardware architectures, providing a common platform for software, including proprietary software.

In 1992, new online discussion groups were created just for Linux. There was even a famous debate between Linus Torvalds and Andrew S. Tanenbaum (the creator of MINIX) about how the kernel should be designed.

In May 1992, version 0.96 was released, which could run the X Window System (a system that lets you use a graphical interface).

Linux 1.0.0 was released in March 1994. It had 176,250 lines of code and was considered ready for serious use. In June 1996, after version 1.3, Linus decided Linux had grown so much that it needed a new major version number, so the next release was 2.0.0. This version added important features like support for multiple processors working together.

Version 2.2, released in January 1999, improved how Linux handled multiple processors and added support for more types of computer chips. It also added support for new file systems, including reading Microsoft's NTFS files.

Version 2.4.0, released in January 2001, added support for USB devices and PC Cards. It also supported newer Pentium 4 and Itanium processors. This version also brought support for Bluetooth and improved RAID (a way to store data across multiple hard drives).

Version 2.6.0 was released in December 2003. This version brought many big changes, including support for more CPUs, better sound (with ALSA), and support for very large files (up to 16 terabytes). It also improved how Linux handles security with SELinux.

Linux supports many different file systems, some made for Linux (like ext3, ext4, Btrfs) and others from different operating systems (like Windows and MS-DOS).

For a long time, Linux developers used a special tool called BitKeeper to manage their code. But in 2005, they had to stop using it. So, Linus Torvalds and others quickly created a new tool called Git, which is now used by many software projects around the world.

In 2011, Linus celebrated the 20th anniversary of Linux by releasing version 3.0.0. He said the big change was "NOTHING. Absolutely nothing." and that it was just a new number for a good kernel.

In December 2012, Linus decided to remove support for older i386 processors to make the kernel simpler. This meant that the 3.7 kernel series was the last to support these very old chips.

The numbering changes from 2.6.39 to 3.0, and from 3.19 to 4.0, didn't mean huge technical differences. It was mostly to avoid having very long version numbers.

In April 2015, Linus released kernel version 4.0. By this time, nearly 12,000 programmers from over 1,200 companies had helped improve Linux. Version 4.1, released in June 2015, had over 19.5 million lines of code!

In March 2019, Linus announced that version 4.22 would become 5.0. He joked that he "ran out of fingers and toes" for the 4.x numbers. This version added support for new graphics technologies and improved existing file systems.

Version 5.8, released in 2020, broke records with 1,991 developers contributing, including 334 new people. They added over 553,000 lines of code!

How Popular is Linux?

Most websites on the internet run on Linux-based operating systems. Also, all of the world's 500 most powerful supercomputers use Linux!

While Linux is very popular for servers and supercomputers, it's not as common on desktop computers compared to other operating systems.

However, Android, which uses a modified Linux kernel, is the most popular operating system for mobile phones and tablets. This makes Linux a huge part of our daily lives, even if we don't always realize it.

The Value of Linux

Redevelopment costs of Linux kernel
Redevelopment costs of Linux kernel

Experts have tried to estimate how much it would cost to create the Linux kernel from scratch using traditional methods. In 2004, they estimated version 2.6.0 would cost around US$612 million. By 2006, the estimate for version 2.6.8 was even higher, at €882 million (about $1.14 billion).

In 2008, the estimate for kernel 2.6.25 was $1.3 billion. By 2011, with the kernel growing, it was estimated to cost around $3 billion to redevelop. As of September 2018, with over 20 million lines of code, rewriting the Linux kernel (version 4.14.14) would cost approximately $14.7 billion! This shows the incredible value of the work done by thousands of developers for free.

How Linux is Shared

Most people use Linux through a "Linux distribution." These are complete operating systems that include the Linux kernel along with other software. Some distributions use the standard kernel, while others, like Red Hat and Debian, make their own changes to it. They often add support for new hardware or features before they appear in the main Linux kernel.

Who Develops Linux?

The Community

Linux Kernel Sizes Graph
Graph of the sizes of Linux Kernel versions in millions of lines of code



The Linux kernel development community is huge, with about 5,000 to 6,000 members. A study from 2017 showed that around 1,500 developers from 200-250 companies contributed to Linux releases 4.8 to 4.13. The top 30 developers contributed about 16% of the code.

Many companies contribute to the Linux kernel. The biggest contributors include Intel, Red Hat, Linaro, IBM, Samsung, SUSE, and Google. Many other companies and independent developers also contribute.

Andrew Morton, a key Linux developer, explained in 2005 that there isn't a strict plan for how the kernel evolves. Instead, many people and companies, who all benefit from Linux, decide what to work on. Linus Torvalds and other leaders don't tell people what to do; the developers themselves decide based on their needs and interests.

None
Linaro
Unknown
Consultants
SUSE
Google
nearly 500 other
companies


Corporate affiliation of contributions to the Linux kernel, 4.8–4.13

Developer Conflicts

Like any large group of people working together, there have been disagreements among Linux kernel developers. For example:

  • In 2007, Con Kolivas stopped developing for the kernel.
  • In 2009, Alan Cox left his role as a maintainer after a disagreement with Torvalds.
  • In 2012, Torvalds publicly criticized NVIDIA for not making their drivers open-source.
  • In 2014, Torvalds stopped Kay Sievers from submitting patches due to issues with his code.
  • In 2015, a developer sued VMware over copyright, which Linus Torvalds disagreed with.
  • In April 2021, a team from the University of Minnesota was found to be submitting "bad faith" patches as part of research. This led to all their past contributions being removed and a warning for future submissions.

Developers have worked to make the community more welcoming. In 2015, a "Code of Conflict" was introduced, and in 2018, it was replaced by a new "Code of Conduct." This happened around the time Linus Torvalds apologized for his past harsh comments and took a short break from development.

Some developers, like Sage Sharp, have pointed out that the community's focus on technical excellence, combined with busy maintainers, could sometimes lead to blunt or rude communication. However, at a conference in 2018, developers said the community's culture had improved a lot, with less "violent language and discussion."

How Linux is Developed

Linus Torvalds once said, "Linux is evolution, not intelligent design!" This means it grows and changes over time, rather than being planned out perfectly from the start.

The Codebase

The Linux kernel's source code is managed using Git, the version control system Linus Torvalds also created.

As of 2021, the Linux kernel version 5.11 had about 30.34 million lines of code! About 14% of this code is the "core" of the kernel, while 60% is for "drivers" that help Linux work with different hardware.

Contributions

Developers contribute to Linux by sending "patches," which are like small text files showing changes to the code. These patches are sent as emails to the Linux kernel mailing list (LKML) and other specific mailing lists. The patches must follow certain rules.

When a developer wants to change the kernel, they write and test their code. They send these changes as patches to the person who manages that part of the kernel. This "maintainer" and others on the mailing list review the changes. Once approved, the maintainer adds the changes to the kernel's Git tree. If the changes are important bug fixes, they are sent to Linus Torvalds quickly. Otherwise, they wait for the "merge window," which is a two-week period after a new kernel version is released.

The Linux kernel project requires developers to follow a "Code of Conduct" to ensure a respectful environment. They also ask for "inclusive language" in the code comments.

Programming Languages

Linux is mainly written in a special version of the C programming language that works with the GCC compiler. This allows for special features, like including small parts of assembly language code directly.

In 2022, Linux started using the newer C11 standard for its C code.

In December 2022, initial support for the Rust programming language was added to Linux 6.1. Later versions, like Linux 6.2 and 6.3, have continued to improve Rust support.

Coding Style

Since 2002, all code added to the Linux kernel must follow specific rules called the "Linux Kernel Coding Style." This helps keep the code consistent and easy to read for everyone.

Versioning

Linux kernel versions use numbers separated by dots, like 6.1.0.

In the past, odd numbers in the second position (like 2.5.x) meant development versions, and even numbers (like 2.6.x) meant stable versions. This system has changed. Now, the first two numbers together indicate the "major version" (like 4.16 or 5.0).

During development, new versions are called "release candidates" and have "-rcN" at the end (e.g., 4.16-rc1). Once a stable version is released, a "stable team" takes over its maintenance, releasing updates with three numbers (e.g., 4.16.1).

Tools Used for Building Linux

The kernel is usually built using the GNU toolchain, a set of programming tools. The GNU C compiler (GCC) is the main compiler. GNU Make helps manage the building process. The GNU Assembler and GNU linker turn the code into the final executable kernel file, called `vmlinux`.

For a long time, GCC was the only compiler that could correctly build Linux. However, since 2010, developers have been working to build Linux with Clang, another compiler. This project is called LLVMLinux. Using Clang can sometimes make compilation faster.

By 2017, Linux 4.15 could be built with Clang. Google's Pixel 2 phone even shipped with a Clang-built Linux kernel. Today, the ClangBuiltLinux group helps ensure compatibility between Linux and LLVM (the system Clang is built on).

Debugging Linux

Kernel-panic
Linux kernel panic output

Finding and fixing problems (debugging) in the Linux kernel can be tricky. Issues often involve how programs access memory or how hardware is managed.

  • An "oops" is a non-fatal error in the kernel. The system might keep running, but it could be unstable.
  • A "panic" is a fatal error. The kernel stops and the computer halts.

Developers use tools like `printk()` to print messages, `ftrace` to track what the kernel is doing, and `kprobes` to temporarily break into kernel execution and collect information. KGDB allows debugging Linux in a similar way to regular programs, often using a second computer.

How Changes are Made

New code is added to the Linux kernel continuously. Any software added must work and compile without errors.

Each part of the kernel has a "maintainer" who checks new code against the kernel's standards. They collect patches and submit them to Linus Torvalds during a "merge window."

Linus merges these patches into the previous stable Linux kernel release, creating a "release candidate" for the next stable version. Once the merge window closes, only bug fixes are accepted. The release candidate is tested, and when it's stable, a new version is released, and the process starts again.

Mainline Linux

The main source code for the Linux kernel is called mainline Linux. All stable kernel releases come from this main code. Mainline Linux supports many devices, but not all. Sometimes, special versions of the kernel are needed for certain devices.

"Mainlining" means adding support for a device or feature to the main Linux kernel. This often involves adding new drivers. Once a feature is mainlined, it's officially part of the core Linux kernel.

Linux Forks

Ipod linux booting kernel
An iPod booting iPodLinux

Sometimes, communities create their own versions of the Linux kernel, called "forks," based on the official one. Some interesting code from these forks has even been added back into the main Linux kernel. Examples include Linux-libre and User-Mode Linux.

Many mobile phone operating systems, like Google Android, Firefox OS, and webOS, initially used heavily changed versions of Linux. In 2010, some Linux developers criticized Google for creating its own kernel version, which made it hard to merge Android's hardware drivers into the main Linux kernel.

Today, Android still uses a customized Linux kernel, but Android developers also contribute patches to the official Linux kernel. This means that some devices, like a Nexus 7, can even run the main Linux kernel.

Linus Torvalds explained in 2001 that there isn't just one single Linux kernel. Every distribution makes its own changes. He sees this as a good thing because it allows different groups to focus on what's important to them. He can then take the best parts from these different versions and add them to the main kernel.

Long-Term Support

The Linux kernel community maintains stable versions by fixing bugs. The website kernel.org usually lists two stable kernels. A new stable Linux kernel is released every 8 to 12 weeks.

Some releases are marked for "long-term support" (LTS). These versions receive bug fixes for two or more years, which is helpful for systems that need to be very stable for a long time.

Size of the Kernel

Some projects, like TinyLinux, try to make the Linux kernel smaller. In 2014, Josh Triplett started the "-tiny" source tree for a reduced-size version.

How Linux Works

Linux kernel map
Map of the Linux kernel
Sankey Diagram of Linux Kernel Source Lines of Code
Sankey diagram of Linux Kernel Source Lines of Code

The Linux kernel is both "monolithic" and "modular." It's monolithic because the entire operating system runs in a special area called "kernel space." But it's also modular because it can be built from smaller pieces (called "modules") that can be added or removed while the system is running.

Here are some important features of the Linux kernel:

  • Multitasking: It can run many programs at the same time, even on computers with multiple processors.
  • Customization: You can choose and set up hundreds of kernel features and drivers before building it. You can also change how it behaves while it's running.
  • Memory Management: It uses advanced techniques to manage computer memory, including "virtual memory."
  • File Systems: It supports many different ways to organize files, like ext4, Btrfs, XFS, and even those from Windows.
  • Virtualization: It can run other operating systems inside it, like a computer within a computer, using technologies like KVM.
  • Security: It has many security features, including SELinux and AppArmor, to control what programs can do.
  • Networking: It supports many ways for computers to communicate, including the internet.

Most device drivers (software that helps the kernel talk to hardware) run in "kernel space," giving them full access to the hardware. However, some exceptions run in "user space."

Unlike some other kernels, Linux doesn't have a fixed way for device drivers to connect. This means that drivers often need to be updated when the kernel changes.

Linux uses "memory protection" and "virtual memory." However, there's also a version called μClinux that can run on smaller microcontrollers without virtual memory.

Hardware information is shown in the file system. For example, you can find information about devices in the `/dev` or `/sys` directories.

Various layers within Linux, also showing separation between the userland and kernel space
User mode User applications bash, LibreOffice, GIMP, Blender, 0 A.D., Mozilla Firefox, ...
System components init daemon:
OpenRC, runit, systemd...
System daemons:
polkitd, smbd, sshd, udevd...
Window manager:
X11, Wayland, SurfaceFlinger (Android)
Graphics:
Mesa, AMD Catalyst, ...
Other libraries:
GTK, Qt, EFL, SDL, SFML, FLTK, GNUstep, ...
C standard library fopen, execv, malloc, memcpy, localtime, pthread_create... (up to 2000 subroutines)
glibc aims to be fast, musl aims to be lightweight, uClibc targets embedded systems, bionic was written for Android, etc. All aim to be POSIX/SUS-compatible.
Kernel mode Linux kernel stat, splice, dup, read, open, ioctl, write, mmap, close, exit, etc. (about 380 system calls)
The Linux kernel System Call Interface (SCI), aims to be POSIX/SUS-compatible
Process scheduling subsystem IPC subsystem Memory management subsystem Virtual files subsystem Networking subsystem
Other components: ALSA, DRI, evdev, klibc, LVM, device mapper, Linux Network Scheduler, Netfilter
Linux Security Modules: SELinux, TOMOYO, AppArmor, Smack
Hardware (CPU, main memory, data storage devices, etc.)

Interfaces

Linux kernel interfaces
Four interfaces are distinguished: two internal to the kernel, and two between the kernel and userspace.

Linux started as a copy of UNIX and tries to follow standards like POSIX. The kernel also has its own special ways for programs to talk to it.

The way the kernel talks to user programs (called the "application binary interface" or ABI) is very stable. This means old programs should still work on new Linux kernels.

However, "loadable kernel modules" (LKMs) cannot rely on a stable ABI. This means they usually need to be recompiled when a new kernel version is installed.

There's no guarantee that the internal way kernel parts talk to each other (the "in-kernel API") will stay the same. So, device driver code and other kernel parts must be updated as the kernel changes.

Kernel-to-Userspace API

The main way user programs talk to the Linux kernel is through "system calls." These are special commands that let a program ask the kernel to do something, like open a file or create a new process. For example, `clone(2)` is a Linux-specific system call.

The C standard library (libC) acts as a helper, providing C functions that make these system calls easier to use.

Special "pseudo filesystems" like `/sys` and `/proc` also provide ways to get information from the kernel about hardware or running programs.

Kernel-to-Userspace ABI

Because there are many different versions of Linux operating systems, a program compiled for one Linux distribution might not always run on another. This is due to differences in how distributions set up the kernel, libraries, and other software.

The Linux Standard Base (LSB) is a standard that tries to make Linux distributions more compatible, but it covers more than just the kernel.

In-Kernel API

Inside the kernel, there are many ways for different parts to talk to each other. Some parts of the kernel's internal code can be used by "loadable kernel modules" (like device drivers) if they are specifically "exported."

Linux provides internal tools for managing data (like lists and trees) and performing common tasks (like copying data or allocating memory). These tools have been stable for a long time.

Internal kernel tools also include libraries for device drivers, such as:

  • SCSI Interfaces and libATA for storage devices.
  • Direct Rendering Manager (DRM) for graphics cards.
  • DMA-BUF for sharing memory buffers between drivers.
  • Video4Linux for video capture hardware.
  • Advanced Linux Sound Architecture (ALSA) for sound cards.
  • New API for network cards.
  • mac80211 and cfg80211 for wireless network cards.

In-Kernel ABI

Linux developers chose not to keep the internal way kernel parts talk to each other (the in-kernel ABI) stable. This means that modules compiled for one kernel version usually won't work with another version without being recompiled.

Process Management

Like other operating system kernels, Linux manages "processes," which are running programs. It can create, pause, restart, and stop them. In Linux, processes are seen as groups of "threads" (smaller parts of a program that can run at the same time).

Each task (thread) is represented by a special data structure. When a process is created, it gets a unique ID called a "PID."

New processes can be created using system calls like `clone` or `fork`. Processes can be paused or resumed by sending signals. A process can stop itself or be stopped by another process.

If a program uses "shared libraries" (code that can be used by many programs), a "dynamic linker" helps find and load them.

The Native POSIX Thread Library (NPTL) provides a standard way for user programs to create and manage threads. The kernel sees these threads as "tasks" that share resources.

"Kernel threads" are special threads created by the kernel itself for its own tasks. They run in kernel space and are not tied to any user program.

Scheduling

The Linux "process scheduler" decides which program or task gets to use the CPU at any given moment. It's modular, meaning it can use different scheduling methods.

Linux allows "preemption," which means the kernel can stop one task and switch to another, even if the first task isn't finished. This makes Linux more responsive, especially for desktop and "real-time" applications (like those needing very precise timing).

For normal tasks, Linux uses the Completely Fair Scheduler (CFS). This scheduler tries to give each task a fair share of CPU time, based on how much time it has already run and its priority.

The kernel also has "real-time" scheduling classes, like `SCHED_FIFO` and `SCHED_RR`, which are used for tasks that need to run with very strict timing. A newer policy, `SCHED_DEADLINE`, was added in 2014 and takes priority over all others.

In 2023, the CFS scheduler was replaced by the earliest eligible virtual deadline first scheduling (EEVDF) scheduler in Linux kernel version 6.6.

Synchronization

The kernel has many things happening at the same time (like interrupts, multiple processors, and different tasks). To prevent problems when multiple parts of the kernel try to access the same data, Linux uses various tools.

These tools include "atomic types" (data that can only be changed in one go), "spinlocks," "semaphores," and "mutexes." These help ensure that critical parts of the code are executed without interruption. Some advanced methods, like RCUs, allow for "lockless algorithms" that don't need to lock data, improving performance.

Linux also includes a tool called "Lockdep" to help find problems with how locks are used.

Interrupts

When hardware needs the kernel's attention (like when you type on the keyboard or click the mouse), it sends an "interrupt." The kernel handles these in two parts:

  • The "top half" is a quick part that handles the immediate interrupt.
  • The "bottom halves" (like "softirq," "tasklets," and "work queues") do the longer, less urgent work later.

Linux can handle multiple interrupts at once, with higher-priority interrupts taking precedence.

Memory Management

The Linux Storage Stack Diagram
The Linux Storage Stack Diagram

The Linux kernel manages both the computer's physical memory (RAM) and "virtual memory." It divides physical memory into different "zones" for specific purposes, like "ZONE_DMA" for direct memory access.

Linux uses "page tables" to manage virtual memory. The kernel itself always stays in physical memory and cannot be swapped to disk. If there's a memory error in the kernel, it can lead to system crashes. User programs, however, can have their memory swapped to disk.

Small pieces of memory can be requested by kernel code using `kmalloc()` and freed with `kfree()`. Larger pieces use `vmalloc()` and `kvfree()`.

The kernel used to have different ways to manage small memory chunks (SLAB, SLUB, SLOB). As of 2024, only SLUB remains, which is simpler and more efficient.

Virtual Filesystem

Linux supports many different ways to organize files (file systems). To make it easier for the kernel and user programs to work with all of them, Linux uses a "virtual file system" (VFS). The VFS acts as a layer that hides the differences between the underlying file systems.

When a user program wants to access a file, it gets a "file descriptor" (a number). But inside the kernel, the file is represented by a special data structure that holds all its information.

Virtual filesystems like `/sys` and `/proc` show information about hardware and running programs. These aren't real files on a disk; the kernel creates them on the fly when you access them.

Supported Architectures

Series 2 tivo front
TiVo DVR, a consumer device running Linux

Even though Linux wasn't originally designed to work on many different types of computers, it has become one of the most widely used kernels. It runs on everything from small ARM architecture devices (like in phones) to large z/Architecture mainframe computers.

The first time Linux was adapted for a different computer type was for the Motorola 68000 platform. This led Linus to change the kernel's code to make it easier to adapt to even more computer types. The first Linux version that supported more than just the i386 chip also supported the 64-bit DEC Alpha AXP platform.

Today, Linux is the main operating system on the world's most powerful supercomputers, including IBM's Summit. In October 2019, all of the world's 500 fastest supercomputers ran some operating system based on the Linux kernel.

Linux has also been adapted for various handheld devices, like Apple's iPhone 3G and iPod.

Supported Devices

The LKDDb project was started in 2007 to create a database of all the hardware and communication methods that Linux kernels know about. In 2014, the Linux Hardware project began collecting information about tested hardware configurations from Linux users.

Live Patching

"Live patching" technologies, like Ksplice, kpatch, and kGraft, allow updates to be applied to the kernel without needing to restart the computer. Basic support for live patching was added to the Linux kernel in version 4.0, released in April 2015.

Security

Bugs in the kernel can create security problems, like allowing someone to gain more control over the system or cause it to stop working. Over the years, many security bugs have been found and fixed. New features are also added to make the kernel more secure.

Linux has many ways to improve security, known as Linux Security Modules (LSM). These include Security-Enhanced Linux (SELinux), originally developed by the NSA, and AppArmor. These modules help control what programs can access.

Another security feature is Seccomp BPF, which filters what system calls user programs can make, reducing potential risks.

Linus Torvalds has said that he considers security bugs to be "normal bugs" and doesn't treat them as special. He believes that focusing too much on "spectacular security holes" can encourage the wrong behavior.

Linux distributions regularly release security updates to fix vulnerabilities in the kernel. Many offer "long-term support" releases that receive security updates for a specific kernel version for a long time.

Legal Aspects of Linux

Licensing Terms

When Linus Torvalds first released Linux, he didn't allow commercial use. But with version 0.12, he switched to the GNU General Public License version 2 (GPLv2). This license allows people to share and sell Linux, even if they change it, as long as they also provide the complete source code under the same license. Linus has called licensing Linux under the GPLv2 the "best thing I ever did."

The Linux kernel is specifically licensed under GPLv2 only, meaning you can't use later versions of the GPL. Any code contributed to Linux must also be compatible with the GPL.

There was a lot of discussion about whether to change the license to GPL version 3. Linus Torvalds and many other key kernel developers preferred GPLv2. They were concerned about certain parts of GPLv3, especially those related to DRM (Digital Rights Management). Linus decided not to adopt GPLv3 for the Linux kernel.

Loadable Kernel Modules

There's a debate about whether "loadable kernel modules" (LKMs) are considered "derivative works" under copyright law. If they are, they would fall under the GPL.

Linux allows you to load "out-of-tree" binary objects (pre-compiled code) into the kernel. If these modules only use a public part of the kernel's interfaces, they are generally not considered "derived works."

However, Linus Torvalds has clearly stated that "binary-only kernel modules ARE derivative 'by default'." This means that if a module is only available as pre-compiled code and wasn't originally designed for another operating system, it's likely considered a derivative work of Linux and should be under the GPL. Proprietary graphics drivers are a common example of this debate.

If proprietary (non-open-source) modules are loaded into Linux, the kernel marks itself as "tainted." This means that developers might ignore bug reports from such systems because the problem could be with the proprietary module, not the kernel itself.

Firmware Binary Blobs

The official Linux kernel contains some "binary blobs" (pre-compiled code) that are released under the GPLv2 license. Linux can also load other binary blobs, like proprietary firmware or drivers, from the file system and link them into the kernel.

Sometimes, firmware is built directly into the kernel for performance reasons. However, this isn't always possible due to technical or legal issues, especially if the firmware isn't GPL compatible.

Trademark

"Linux" is a registered trademark of Linus Torvalds in the United States, the European Union, and other countries. A legal battle over the trademark began in 1996 when someone tried to charge fees for using the word "Linux." After it was shown that the word was already widely used, the trademark was given to Linus Torvalds.

See also

Kids robot.svg In Spanish: Núcleo Linux para niños

kids search engine
Linux kernel Facts for Kids. Kiddle Encyclopedia.