First linux kernel version
In 1991 Linux Torvalds wrote (the first version of) the Linux kernel. He put it online, and other people started contributing code. Over 4000 individuals contributed source code to the latest kernel release (version 2.6.27 in November 2008).
Major Linux kernel versions used to come in even and odd numbers. Versions 2.0 , 2.2 , 2.4 and 2.6 are considered stable kernel versions. Whereas 2.1 , 2.3 and 2.5 were unstable (read development) versions. Since the release of 2.6.0 in January 2004, all development has been done in the 2.6 tree. There is currently no v2.7.x and according to Linus the even/stable vs odd/development scheme is abandoned forever.
uname -r
To see your current Linux kernel version, issue the uname -r command as shown below.
This first example shows Linux major version 2.6 and minor version 24 . The rest -22-generic is specific to the distribution (Ubuntu in this case).
paul@laika:~$ uname -r 2.6.24-22-generic
The same command on Red Hat Enterprise Linux shows an older kernel (2.6.18) with -92.1.17.el5 being specific to the distribution.
[paul@RHEL52 ~]$ uname -r 2.6.18-92.1.17.el5
/proc/cmdline
The parameters that were passed to the kernel at boot time are in /proc/cmdline .
paul@RHELv4u4:~$ cat /proc/cmdline ro root=/dev/VolGroup00/LogVol00 rhgb quiet
single user mode
When booting the kernel with the single parameter, it starts in single user mode . Linux can start in a bash shell with the root user logged on (without password).
Some distributions prevent the use of this feature (at kernel compile time).
init=/bin/bash
Normally the kernel invokes init as the first daemon process. Adding init=/bin/bash to the kernel parameters will instead invoke bash (again with root logged on without providing a password).
/var/log/messages
The kernel reports during boot to syslog which writes a lot of kernel actions in /var/log/messages . Looking at this file reveals when the kernel was started, including all the devices that were detected at boot time.
[root@RHEL53 ~]# grep -A16 "syslogd 1.4.1:" /var/log/messages|cut -b24- syslogd 1.4.1: restart. kernel: klogd 1.4.1, log source = /proc/kmsg started. kernel: Linux version 2.6.18-128.el5 (mockbuild@hs20-bc1-5.build.red. kernel: BIOS-provided physical RAM map: kernel: BIOS-e820: 0000000000000000 - 000000000009f800 (usable) kernel: BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved) kernel: BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved) kernel: BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved) kernel: BIOS-e820: 0000000000100000 - 000000001fef0000 (usable) kernel: BIOS-e820: 000000001fef0000 - 000000001feff000 (ACPI data) kernel: BIOS-e820: 000000001feff000 - 000000001ff00000 (ACPI NVS) kernel: BIOS-e820: 000000001ff00000 - 0000000020000000 (usable) kernel: BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved) kernel: BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved) kernel: BIOS-e820: 00000000fffe0000 - 0000000100000000 (reserved) kernel: 0MB HIGHMEM available. kernel: 512MB LOWMEM available.
This example shows how to use /var/log/messages to see kernel information about /dev/sda .
[root@RHEL53 ~]# grep sda /var/log/messages | cut -b24- kernel: SCSI device sda: 41943040 512-byte hdwr sectors (21475 MB) kernel: sda: Write Protect is off kernel: sda: cache data unavailable kernel: sda: assuming drive cache: write through kernel: SCSI device sda: 41943040 512-byte hdwr sectors (21475 MB) kernel: sda: Write Protect is off kernel: sda: cache data unavailable kernel: sda: assuming drive cache: write through kernel: sda: sda1 sda2 kernel: sd 0:0:0:0: Attached scsi disk sda kernel: EXT3 FS on sda1, internal journal
dmesg
The dmesg command prints out all the kernel bootup messages (from the last boot).
[root@RHEL53 ~]# dmesg | head Linux version 2.6.18-128.el5 (mockbuild@hs20-bc1-5.build.redhat.com) BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009f800 (usable) BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved) BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved) BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 000000001fef0000 (usable) BIOS-e820: 000000001fef0000 - 000000001feff000 (ACPI data) BIOS-e820: 000000001feff000 - 000000001ff00000 (ACPI NVS) BIOS-e820: 000000001ff00000 - 0000000020000000 (usable)
Thus to find information about /dev/sda, using dmesg will yield only kernel messages from the last boot.
[root@RHEL53 ~]# dmesg | grep sda SCSI device sda: 41943040 512-byte hdwr sectors (21475 MB) sda: Write Protect is off sda: Mode Sense: 5d 00 00 00 sda: cache data unavailable sda: assuming drive cache: write through SCSI device sda: 41943040 512-byte hdwr sectors (21475 MB) sda: Write Protect is off sda: Mode Sense: 5d 00 00 00 sda: cache data unavailable sda: assuming drive cache: write through sda: sda1 sda2 sd 0:0:0:0: Attached scsi disk sda EXT3 FS on sda1, internal journal
History of the Linux Kernel
Even though most people have heard of Linux, they still associate it primarily with various operating system distributions built around it. In this article, we describe the history of Linux as an open source operating system kernel, which is the central component of most computer operating systems that acts as a bridge between applications and the actual data processing done at the hardware level. The history of the Linux kernel is both fascinating and educational as it can teach us a lot about the underlying motivations of Linux developers and help us understand the direction the kernel is headed.
Introduction
What started as one man’s humble idea has grown to become the most important open source project ever created. The Linux kernel currently has over 27 million lines of code, and it runs on all of the world’s 500 most powerful supercomputers. It also runs on servers, desktops, laptops, TV boxes, routers, tablets, smartphones, wearable devices, and it powers much of the rapidly growing network of connected devices known as the Internet of Things.
Over 12,000 programmers from more than 1,200 companies have contributed to the project, including Intel, Red Hat, Linaro, Samsung, SUSE, IBM, and Microsoft. In other words, the Linux kernel is hugely important, and its future is looking brighter than ever.
Creation of the Linux Kernel
But it wasn’t always like this. Not too long ago, in 1991, the Linux kernel was nothing but an announcement made by Linus Torvalds, at the time a 21-year-old computer science student at the University of Helsinki, Finland.
“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),” Linus posted to comp.os.minix, a newsgroup on Usenet, a worldwide distributed discussion system that predates current Internet forums.
In his historic announcement, Linus mentioned two other important projects: GNU and MINIX. The latter is a Unix-like computer operating system that was initially released in 1987 by Andrew S. Tanenbaum for educational purposes. Unix-like computer operating systems are inspired by Bell Labs’ original Unix computer operating system, often emulating its features and architecture. GNU is also a Unix-like operating system, initiated by Richard Stallman and first announced in 1983, but it differs from Unix in two important aspects: it’s free, and it doesn’t contain any Unix code.
Linus had been using MINIX during the time he spent as a student at the University of Helsinki in Finland. After he had become frustrated with MINIX’s licensing model, he decided to develop his own free alternative to Unix, one that would embrace the concept of free software that had only just started to become popular at the time thanks to Richard Stallman and his GNU General Public License (GPL), which guarantees end users the freedom to run, study, share and modify the software.
Linus started by porting some essential GNU components, and it remains true to this day that many Linux distributions heavily rely on GNU. “I’ve currently ported bash (1.08) [a Unix shell and command language written by Brian Fox] and gcc (1.40) [a compiler system produced by the GNU Project supporting various programming languages], and things seem to work. This implies that I’ll get something practical within a few months, and I’d like to know what features most people would want. Any suggestions are welcome, but I won’t promise I’ll implement them.”
In September 1991, version 0.01 of the Linux kernel was released on the FTP server of FUNET, the Finnish University and Research Network, containing 10,239 lines of code. When Linus announced version 0.02 on October 5, 1991, the Linux kernel still needed MINIX to operate, but the number of volunteers from around the world who decided to contribute to the project without expecting anything in return had been steadily increasing. In December of the same year, Linux kernel 0.11 was released as the first version that could be compiled by a computer running the same kernel version. With Linux kernel 0.12, released in February 1992, Linux officially adopted the GNU General Public License (GPL).
Release of Linux kernel 1.0.0
In March 1992, Linux kernel 0.95 became the first version of the Linux kernel capable of running the X Window System, which is a windowing system for bitmap displays that offers a basic framework for a GUI environment by providing a way for windows to be drawn on a display device and interacted with using a mouse and keyboard. The massive version-jump from 0.12 to 0.95 reflected the fact that the Linux kernel had matured and evolved into a full-featured system.
To cement this notion further, Linux kernel 1.0.0 was released on March 14, 1994. It had 176,250 lines of code, and you can still study the original code and read the original release notes, which state that the Linux kernel 1.0 “has all the features you would expect in a modern fully-fledged Unix, including true multitasking, virtual memory, shared libraries, demand loading, shared copy-on-write executables, proper memory management, and TCP/IP networking.”
Modern-Day Development of Linux kernel
The Linux kernel continued to be heavily improved through the 1990’s, with version 2.0 released on June 6, 1996, and version 2.2.13, which allowed the Linux kernel to run on enterprise-class machines thanks to IBM mainframe patches, released on December 18, 1999.
After the arrival of the new millennium, Linux evolved to a world-wide development project with countless contributors from around the world. You can see the complete changelog of everything that happened from December 17, 2001 to the present day by visiting this website. According to recent estimations, “The average number of changes accepted into the kernel per hour is 7.71, which translates to 185 changes every day and nearly 1,300 per week.”
Considering that Linus never intended for his pet project to become so big, the Linux kernel is a true testament to the power of open source development and the ingenuity and skill of independent developers motivated by the desire to collectively create something great.