Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Linux Kernel

The Linux kernel is a crucial component of the Linux operating system, often described as its heart or core. It is the fundamental program responsible for managing a computer's hardware resources and acting as an interface between the hardware and other software programs.

Here's a detailed overview of the Linux kernel:

  • Origin and Creation

    • The Linux kernel was developed by Linus Torvalds, who independently released its first version in 1991.
    • Torvalds was a student at the University of Helsinki when he began this project, partly out of frustration with the licensing limitations of the MINIX operating system, which at the time restricted it to educational use.
    • MINIX, a Unix-like system created by Professor Andrew S. Tanenbaum, served as a catalyst for Linux development, with Torvalds learning some system calls from Tanenbaum's text and initially developing the Linux kernel on MINIX.
    • Torvalds stated that if the GNU kernel (Hurd) or 386BSD had been available in 1991, he likely would not have created Linux.
    • Unlike the original Unix, the Linux kernel was written from scratch and is not derived from the original Unix source code, thus avoiding the legal issues prevalent at the time.
  • Relationship with GNU

    • The Linux kernel "fit into the last major gap" in the GNU system, which had been under development since 1983 by Richard Stallman to create a complete free Unix-like operating system but lacked a functional kernel.
    • Early Linux developers ported GNU code, including the GNU C Compiler, to work with the Linux kernel.
    • This combination of the Linux kernel with GNU components (such as the GNU C Library, GNU Core Utilities, GNU Compiler Collection, and Bash shell) resulted in a "complete free system".
    • Richard Stallman and the Free Software Foundation (FSF) advocate calling this combined system "GNU/Linux" to acknowledge the GNU Project's substantial contributions.
    • The FSF argues that the GNU Project set out to create an integrated system, and the Linux kernel filled a crucial missing piece. They believe that simply calling the system "Linux" attributes its origin and purpose solely to Torvalds, overlooking GNU's foundational role.
    • However, Linus Torvalds and many others prefer to call the whole operating system "Linux," arguing that the name is more widely used and that "GNU/Linux" is too cumbersome.
    • It's important to note that not all Linux-based systems use GNU components; for example, Google's Android uses the Linux kernel but does not primarily use GNU components. Distributions like Alpine Linux also stand out as non-GNU Linux-based operating systems, often using BusyBox and musl instead of traditional GNU libraries.
  • Relationship with Unix

    • The Linux kernel is a Unix-like operating system kernel. This means it behaves like Unix and adheres to Unix design principles and standards, such as POSIX.
    • However, unlike BSDs (FreeBSD, NetBSD, OpenBSD, DragonFly BSD), which trace their software revisions directly back to the original AT&T Unix source code, Linux was developed independently and does not share that direct source code lineage.
    • Despite this, Linux (and its distributions) maintain similar commands and file structures to Unix due to this inspiration and adherence to standards. Many common Unix commands like ls, rm, cp, grep, and find are also found in Linux.
  • Design and Features

    • The Linux kernel uses a monolithic kernel design, where essential functions like memory management, process scheduling, and hardware drivers are tightly integrated.
    • However, it incorporates modularity through loadable kernel modules (LKMs), allowing dynamic expansion of kernel functionality without requiring a full system reboot. Device drivers are often integrated directly or added as modules.
    • The kernel handles process control, networking, access to peripherals, and file systems.
    • The Linux kernel is licensed under the GNU General Public License (GPL) version 2, which means its source code can be freely used, modified, and distributed. Linus Torvalds does not plan to move the kernel to GPLv3.
    • It supports a wide variety of hardware architectures, from personal computers and smartphones to mainframes and supercomputers, due to its portability and the community's efforts.
  • Usage and Popularity

    • The Linux kernel powers a vast majority of devices today, including servers, mainframes, and smartphones (via Android).
    • It is the predominant operating system for servers, with estimates suggesting it runs on over 96.4% of the top one million web servers and at least 80% of public cloud workloads.
    • All of the world's 500 fastest supercomputers use Linux.
    • Linux distributions, which combine the Linux kernel with other software components, have made Unix technologies accessible to home users and are used in a wide variety of applications.