The Linux kernel has once again reached a remarkable milestone, now surpassing 40 million lines of code – a tremendous amount of work driven by the dedication of countless developers who generously contribute their time and skills to developing the operating system.
For those who love numbers and statistics, this represents a substantial leap from the 20 million lines recorded in mid-2015, effectively doubling its size in less than a decade.
It’s also worth mentioning that the Linux kernel contains much more code than its UNIX counterparts, such as OpenBSD, NetBSD, and FreeBSD.
However, this is mainly due to design differences—the BSD kernels are modular, while the Linux kernel follows a monolithic architecture (with modular capabilities), meaning that it runs as a single large process in kernel mode, with full access to the hardware and all system resources.

However, this considerable growth is often a source of discussion among developers and industry observers who worry that a larger kernel might introduce unnecessary complexity. Some have proposed methods to trim its size, such as outsourcing drivers—currently accounting for more than half of the code.
At first glance, that might look like a smart approach to lighten the load. Yet, on closer inspection, many experts argue that separating drivers could lead to performance overhead, increased maintenance headaches, and complicated version tracking.
Going forward, it will be fascinating to see how kernel maintainers balance the need to stay lean with the desire to remain inclusive of cutting-edge hardware. Certainly, the Linux kernel will only keep growing, but we’re confident that Linus Torvalds has it all under control with a clear vision for its future development—the heart of our favorite operating system.
that is mind boggling. Is there a ai that is capable of checking all that code for security issues or is ai still not ready for that.
No. Because AI would have to be teached with kernel code so it would be a egg/chiken dilemma.
There is no such thing as AI. It is only analysis of whats available. It is artificial stupid. Teach it wrong and it gives answers wrong.
I bet it is more secure without AI 😉
what your saying makes sense to me. thanks.
Quite many lines are{and}
…when you use -l switch on wc.
But still, it is going wrong. Who to blame?
Normal desktop or even mobile user does not use 70% of it.
The normal user probably uses even less than that, but that's not the question that has value; it isn't how much the average user uses, but how much is commonly used. With it bring mostly drivers and hardware interface, each user is only going to use the small chunk that relates to their hardware, but assumedly all of it is used but someone. If there is archaic code that is never called, that's a valid target for culling.
And if their hardware is not in that kernel code they are so upset and complain about Linux!!!
i got lucky a year ago with new system i purchased. I was reading about issues after i ordered but luckily the distro i use released a new kernel that worked with what i ordered almost the same time my order arrived.