To see the kernel version number, simply run uname -r on your shell. How do you precisely interpret the output of uname -r? On our Ubuntu distribution version 18.04 LTS guest VM, we run uname(1), passing the -r option switch to display just the current kernel release or version:
$ uname -r
5.0.0-36-generic
Of course, by the time you read this, the Ubuntu 18.04 LTS kernel has certainly been upgraded to a later release; that's perfectly normal. The 5.0.0-36-generic kernel was the one I encountered with the Ubuntu 18.04.3 LTS at the time of writing this chapter.
The modern Linux kernel release number nomenclature is as follows:
major#.minor#[.patchlevel][-EXTRAVERSION]
This is also often written or described as w.x[.y][-z].
The square brackets around the patchlevel and EXTRAVERSION components indicate that they are optional. The following table summarizes the meaning of the components of the release number:
Release # component | Meaning | Example numbers... |