-5

I have question regarding Linux kernel , as far as I understand, to make Linux compatible with different machines and hardware , different device driver is added to the Linux . I want to ask how much feasible is to add tons of device driver to Linux kernel , suppose after 30 -40 years the size of Linux kernel will be around ~1 GB . I am not able to accept and understand this philosophy of Linux . if you say that i can edit/remove unwanted modules from Linux kernel , my answer would be that not everyone is technological sound to do so .

12
  • 1
    "my answer would be that not everyone is technological sound to do so " Every single person using Linux on the desktop loads a bunch of modules every single time they boot - why do you say people can't do this? Commented Mar 8, 2021 at 12:01
  • @PhilipKendall i am saying with my experience my siblings,friends,parents and teacher they are able to use some flavour of linux for basic browsing thats all they do not care the size of operating system . but i do care i cant accept that there is a driver in my system which i will never use in my entire file . its useless space eating thing. Commented Mar 8, 2021 at 12:07
  • 1
    "i cant accept that there is a driver in my system which i will never use in my entire file " you would not BELIEVE the amount of unused junk Windows is carrying around with it. Commented Mar 8, 2021 at 12:47
  • 2
    If you really care, build yourself a custom kernel image which contains only the drivers you need. I have better things to do with my life than save myself a few Mb of storage. Commented Mar 8, 2021 at 12:49
  • 1
    @user143252 you can't download new packages without a network driver. So the bare minimum is to include all the possible network and wifi cards. Oh, and you need all the disk, disk controller, and cdrom drivers in order to start up and to have somewhere to download them to. And so on... Commented Mar 8, 2021 at 13:48

2 Answers 2

4

I have question regarding Linux kernel, as far as I understand, to make Linux compatible with different machines and hardware, different device driver is added to the Linux

That is correct, but the exact same situation is also true for other operating systems, like MS Windows.

There are several forces at play that keep the kernel to a manageable size, without requiring a deep technological knowledge from the end-users.

  • People don't write a separate device driver for each individual model of some hardware. Device drivers are written for whole families or classes of devices. This is true in both the Linux and Windows worlds, because the device manufacturers don't want to wait with selling their newest products until the software people have caught up.
  • Kernel development is a moving target and that means that device drivers need to be updated from time to time. If nobody is using a particular kind of hardware anymore, then there is little interest in keeping the device drivers up-to-date and support for those devices will be dropped (which means the device drivers will also be removed).
  • The Linux distributions also make choices which device drivers they install by default and which drivers are installed on-demand when the user indicates they need them.

As you can see, it is not just adding device drivers, but also removing them. And nearly all of that work gets done by knowledgeable developers, precisely because not all users have the technological know-how.

4

This is not a "philosophy of Linux", it's a fact of life: over time, new hardware is invented, and needs new software to interface with it. This is true of every OS, in proportion to the range of hardware the OS supports - so, Windows will have a very similar range to Linux; MacOS much narrower due to Apple's control of the hardware platform.

How much of that software is installed by default can vary:

  • some of it can be downloaded from the internet when needed, but you need a certain amount to even get that far
  • some eventually becomes rare and obsolete, so will be deleted or moved into a harder to obtain archive; that inconveniences those people that do need it, but saves a bit of space for everyone else
  • the manufacturer of a particular system could hand-tune the drivers installed to match the hardware included; I'm sure Android phones don't ship with unused drivers, because there is no chance of the hardware changing

In the end, it's mostly just not a problem. Storage is cheap, compared to the size of the files we're talking about. Having unused drivers on your SSD won't slow anything down, and will cost you next to nothing. If the drivers are actually loaded into RAM, that could cause performance problems, but every modern OS has a modular design that only loads the drivers actually needed.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.