Americas

  • United States
sandra_henrystocker
Unix Dweeb

Is the Linux 4.18 kernel heading your way?

Analysis
Aug 27, 20185 mins
Linux

The recently released 4.18 Linux kernel has already moved up to 4.18.5. How soon it lands on your system or network depends a lot on which Linux distributions you use.

How soon the 4.18 kernel lands on your system or network depends a lot on which Linux distributions you use. It may be heading your way or you may already be using it.

If you have ever wondered whether the same kernel is used in all Linux distributions, the answer is that all Linux distributions use the same kernel more or less, but there are several big considerations that make that “more or less” quite significant:

  1. Most distributions add or remove code to make the kernel work best for them. Some of these changes might eventually work their way back to the top of the code heap where they will be merged into the mainstream, but they’ll make the distribution’s kernel unique — at least for a while.
  2. Some releases intentionally hold back and don’t use the very latest version of the kernel in order to ensure a more predictable and stable environment. This is particularly true of versions that are targeted for commercial distribution. For example, RHEL (Red Hat Enterprise Edition) will not be nearly as aggressively updated as Fedora.
  3. Some distributions use a fork called Linux-libre, which is Linux without any proprietary drivers built in. It omits software that does not include its source code, has its source code obfuscated, or is released under proprietary licenses.

What is kernel.org?

In case this URL isn’t familiar, www.kernel.org is the website of the organization that distributes the Linux kernel and other open source software to the public without charge. The site provides kernel archives where anyone can download source. And, yes, even you can go and download source code for Linux.

The latest stable version is currently 4.18.5. The kernel.org site provides extensive and easily navigated directories that can shed as much light on the Linux kernel as you might care to absorb. That includes the ability to view individual files that represent portions of the code base or download past or current releases.

If you go to www.kernel.org, you will see options for downloading kernel tarballs, viewing the verification signatures for the tarballs, and investigating patches. If you have never considered the amount of code that comprises the Linux kernel or imagined how accessible it is, visiting the site and spending a little time wandering around might prove to be quite an exciting experience. Try drilling down to a single script, as in this example picked at random, and you’ll see how easy it is to probe into code that makes up the core of Linux.

You can download an entire Linux kernel tarball, such as that for linux-4.18.5.tar.xz, here. If you download one of the tarballs, use the unxz command to uncompress the file and tar to extract the files.

Kernel categories

Most of us are probably running “stable” releases of Linux. Still, it’s useful to know that kernels fall into a number of maturity classifications and what that means to your systems. You should get used to seeing the following kernel classifications:

  • Prepatch — These are kernel pre-releases meant for use by kernel developers and Linux users who are very anxious to get a look at the latest code. These kernels usually contain features that have yet been fully tested.
  • Mainline — These kernels include new features that are being introduced while significant new development is occurring.
  • Stable — These kernels have been released publicly, and bug fixes have been backported to the mainline. Usually only a few bug fixes are released before the next mainline kernel is available
  • Stable/EOL — For these kernels, no more bug fixes are planned. If you are running one of these, you should definitely consider upgrading.
  • Longterm — These kernels are usually “longterm maintenance” kernel releases provided for the purposes of backporting bug fixes for older kernel trees.

What Linux kernel is your system running?

To check how your system compares to the latest and greatest Linux kernel, use the uname command. uname -r will show details just on the kernel itself. Other uname options provide additional system information. In the loop below, we run through each of the uname options. The output has been labelled to make each of the options easier to understand.

$ for arg in s n r v m p i o

> do

>   uname -$arg

> done

Linux     

butterfly     

4.18.0-041800-generic     

#201808122131 SMP Sun Aug 12 21:33:20 UTC 2018     

x86_64     

x86_64     

x86_64     

GNU/Linux     

Note that the “kernel release” and “kernel version” designations are altogether different. That 12-digit number that you will see in the kernel version output is simply a date in the yyyymmddtime format, while that same information is displayed in a more readable format immediately afterwards (apparently with a slight difference in the time).

Wrap-up

The 4.18 Linux kernel is bringing lots of welcome changes for performance, security, and functionality to our Linux systems. If you’ve never taken a look at the code that the linux kernel is built from, maybe it’s time to check out what it looks like and how easily accessible it is.

sandra_henrystocker
Unix Dweeb

Sandra Henry-Stocker has been administering Unix systems for more than 30 years. She describes herself as "USL" (Unix as a second language) but remembers enough English to write books and buy groceries. She lives in the mountains in Virginia where, when not working with or writing about Unix, she's chasing the bears away from her bird feeders.

The opinions expressed in this blog are those of Sandra Henry-Stocker and do not necessarily represent those of IDG Communications, Inc., its parent, subsidiary or affiliated companies.

More from this author