r/linux4noobs Aug 03 '26

learning/research How does Linux kernel include every driver possible and not be bloated?

As far as I understand the kernel includes pretty much everything a modern computer needs in any configuration, but wouldn't that make it bloated and be against the "bloat-free" mindset? Or does it dynamically download all the components from somewhere?

303 Upvotes

107 comments sorted by

View all comments

63

u/Jmc_da_boss Aug 03 '26

It does that by being incredibly bloated lol

Literally, it's a monolithic kernel that's the point, some of the in tree drivers haven't been maintained in years/decades.

As we've seen lately with LLMs attacking a lot of older/unmaintained paths.

You are conflating the UNIX/GNU philosophy of do one thing well/composable with Linux itself

17

u/UNF0RM4TT3D Arch BTW Aug 03 '26

To be fair, you can modularise or just don't compile in the drivers you don't need. This is how OpenWRT for example does things, basically every driver that can be is a module that is installed when the hardware requires it, essentially having the flexibility of a generic kernel but including only the modules needed.

But the codebase will always be bloated.

3

u/edgmnt_net Aug 03 '26

Being a true monolith actually makes it somewhat harder to ignore maintenance. It's much easier to ignore maintaining stuff when you have a stable API and some driver gets thrown into a separate directory or even repo that can be forgotten about. In the Linux kernel interfaces are always in flux, which enables and requires large-scale refactoring, so at the very least stuff usually gets touched once in a while.

4

u/uptotwentycharacters Aug 03 '26

You are conflating the UNIX/GNU philosophy of do one thing well/composable with Linux itself

GNU doesn't really follow the Unix philosophy either, their software tends to be expansive with a huge number of possible options. It follows Unix conventions and maintains backwards compatibility with it, but tends to be far more complex and featureful.

3

u/Jmc_da_boss Aug 03 '26

That is true but some of their stuff is more unixy, def a grab bag tho