Why are kernels numbered that way? [Solved]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
sjmathis
Level 3
Level 3
Posts: 100
Joined: Sun Dec 11, 2016 8:22 pm

Why are kernels numbered that way? [Solved]

Post by sjmathis »

This topic (What is the correct kernel version for Linux mint?) raises another silly question. Why number them like that? Why not put a couple of zeroes in the number so that the order is obvious? For example, instead of 5.1, use 5.001. Then it would be obvious that 5.004 is older than 5.015, right?
Last edited by sjmathis on Thu Oct 06, 2022 8:08 am, edited 1 time in total.
User avatar
xenopeek
Level 25
Level 25
Posts: 27585
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Why are kernels numbered that way?

Post by xenopeek »

sjmathis wrote:
Wed Oct 05, 2022 9:53 am
Why not put a couple of zeroes in the number so that the order is obvious?
Because the dot is a delimiter between the version components (major.minor.micro) and not a decimal separator. Version components can have characters other than digits, like you can have a "1.beta" test release before a "1.0" stable release. Versions aren't numbers.
Image
User avatar
spamegg
Level 9
Level 9
Posts: 2790
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Why are kernels numbered that way?

Post by spamegg »

It's called semantic versioning https://semver.org/ Although I believe the Linux devs use a somewhat different, simpler versioning scheme.
billyswong
Level 4
Level 4
Posts: 347
Joined: Wed Aug 14, 2019 1:02 am

Re: Why are kernels numbered that way?

Post by billyswong »

Dot being delimiter not decimal separator is common in computer world. One popular use aside from software versioning is IPv4 addresses. "8.8.8.8", "127.0.0.1", "192.168.0.254", "10.4.28.57", with the ".4." smaller than ".168.".

Linux versioning isn't exactly semantic versioning, but still follow the x.y.z structure. For version comparison, each number delimited by dots are compared correspondingly as integer. 2-dight y value is bigger than 1-digit y value and 3-digit y value is bigger than 2-digit y value. Same for x value and z value. With such structure, the y value or z value never need to be worried if they get too big and roll over to increment of the left number. For example the upstream 5.4 Linux kernel (which LM 20 based on) recently just incremented to 5.4.216

P.S. Outside computer world, we use such kind of numbering for indexing in books. Chapter 2 section 9 increments to chapter 2 section 10, which may be denoted 2.9 & 2.10
Last edited by billyswong on Wed Oct 05, 2022 1:48 pm, edited 1 time in total.
Hawaiihemd
Level 1
Level 1
Posts: 32
Joined: Fri Sep 25, 2020 12:42 pm

Re: Why are kernels numbered that way?

Post by Hawaiihemd »

Well explained here: https://youtu.be/4nJY08S4BZE
User avatar
Pjotr
Level 23
Level 23
Posts: 18142
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Why are kernels numbered that way?

Post by Pjotr »

Linux Mint uses Ubuntu kernels. Note that the Ubuntu kernel devs apply their own version numbering, which differs from the upstream numbering at kernel.org.

This is how to find out what the upstream number of your Ubuntu kernel is:
https://easylinuxtipsproject.blogspot.c ... .html#ID19
(item 19)
Tip: 10 things to do after installing Linux Mint 21 Vanessa
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
sjmathis
Level 3
Level 3
Posts: 100
Joined: Sun Dec 11, 2016 8:22 pm

Re: Why are kernels numbered that way?

Post by sjmathis »

Excellent explanations. Many thanks!
User avatar
all41
Level 18
Level 18
Posts: 8438
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Why are kernels numbered that way?

Post by all41 »

sjmathis wrote:
Thu Oct 06, 2022 8:07 am
Excellent explanations. Many thanks!
It's an enlightening question--thanks back your way
Everything is difficult before it gets easy.
Post Reply

Return to “Beginner Questions”