# 06-A.2: Linux Kernel


## The Linux Kernel

Linux is the world’s largest and most pervasive open source software project in the history of computing. The Linux kernel, developed by contributors worldwide, is a free and open-source, monolithic, modular (i.e., it supports the insertion and removal at runtime of loadable kernel objects), Unix-like operating system kernel.

It is deployed on a wide variety of computing systems, such as embedded devices, mobile devices (including its use in the Android operating system), personal computers, servers, mainframes, and supercomputers.

The Linux kernel was conceived and created in 1991 by Linus Torvalds for his personal computer and with no cross-platform intentions, but has since ported to a wide range of computer architectures. Notwithstanding this, the Linux kernel is highly optimized with the use of architecture specific instructions (ISA), therefore portability isn't as easy as it is with other kernels (e.g., with NetBSD, that as of 2019 supports 59 hardware platforms).

Linux was soon adopted as the kernel for the GNU Operating System, which was created as an open source and free software, and based on UNIX as a by-product of the fallout of the Unix wars. Since then it has spawned a plethora of operating system distributions, commonly also called Linux, although, formally, the term "Linux" refers only to the kernel.

### The uname Command

The uname command displays the information about the system.

Syntax:

uname [ OPTION ]

Below are examples of the uname command with the -r and -a options. The output of both commands show the kernel version, with the -a (all) option showing much more details.

pbmac@pbmac-server $uname -r 4.15.0-91-generic pbmac@pbmac-server$ uname -a
Linux pbmac-server 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


What do the other digits mean here? Here is an explanation:

• 4 – Kernel version
• 15 – Major revision
• 0 – Minor revision
• 91 – Bug fix
• generic – Distribution-specific string. For Ubuntu, it means I’m using the desktop version. For Ubuntu server edition, it would be ‘server.’

There is a LOT of other information in this output:

• Linux – Kernel name. If you run the same command on BSD or macOS, the result will be different.
• pbmac-server – Hostname.
• 4.15.0-91-generic – Kernel release (as we saw above).
• #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 – This means that Ubuntu has compiled 4.15.0-91-generic 92 times. A timestamp for the last compilation is also there.
• x86_64 – Machine architecture.
• x86_64 – Processor architecture.
• x86_64 – Operating system architecture (you can run a 32-bit OS on a 64-bit processor).
• GNU/Linux – Operating system (and no, it won’t show the distribution name).

Linux kernels have different support levels depending on version. E.g., version 5.4 released in November 2019, was declared to have Long-Term Support (LTS). It has 6 years of support that way.

The table is from Wikipedia, and shows the 5.x.y releases. The Current Version column shows the present version of the version specified in the left most column. Several of the releases show an EOL in the far right column. This stands for End of Life, meaning that particular version is no longer supported.