Sure, Linux is on many, many devices which have proprietary UIs. And there it does pretty well, because the kernel just provides generic functionality cheaply. It’s a commodity backend that could be swapped with another commodity backend without any users knowing or caring. Hooray. Linux is the go to choice when you could just as well be using something else that’s really cheap, like BSD.
However, desktop Linux is where the product is 100% OSS. That’s the apples to apples comparison. And that’s where it can’t compete without vendors writing property code to put in front of it to make it actually work well.
Server side Linux gets a lot of support from professional programmers paid by big corps. They have improved it beyond hobbyist level, and it works pretty well. And of course cheap makes up for a lot.
The kernel does not provide "generic" functionality; it provides very specific, often top-notch functionality which you can't easily find elsewhere, at least not as an easy replacement.
Linux has the largest collection of various hardware drivers, and a rather wide community of kernel developers who know how to produce them.
Linux has a number of specialty filesystems, some pretty important for embedded development.
Linux kernel has real-time extensions, which is not entirely a commodity, AFAICT.
Also, stuff like io_uring, BPF VM inside the kernel, namespaces (see "containers"), etc.
No, I don't think you can easily replace Linux kernel with whatever BSD kernel, Darwin, VxWorks, Contiki, FreeRTOS, etc, or, well, Windows. Much of the larger embedded stuff is Linux-specific, and much of big server stuff is either Linux-only or has extensive specific support.
It was designed for portability from the beginning and was ported to x86:
> Various versions of NT family operating systems have been released for a variety of processor architectures, initially IA-32, MIPS, and DEC Alpha, with PowerPC, Itanium, x86-64 and ARM supported in later releases.
> In order to prevent Intel x86-specific code from slipping into the operating system, due to developers being used to developing on x86 chips, Windows NT 3.1 was initially developed using non-x86 development systems and then ported to the x86 architecture. This work was initially based on the Intel i860-based Dazzle system and, later, the MIPS R4000-based Jazz platform. Both systems were designed internally at Microsoft.
We're talking about "devices which have proprietary UIs" so in that case, the company creating the proprietary UI is free to choose the hardware. At that point, all of the benefits of Linux over BSD cease to exist, because the vendor can simply choose hardware that supports BSD (or pay someone to develop drivers). So yes, in those specific cases (again, "devices which have proprietary UIs"), you could easily replace Linux with BSD.
The "operating system" is not really operating the system anymore. They're just an app sandboxed away from the real hardware by the real operating systems hidden away in the machine.
> Sure, Linux is on many, many devices which have proprietary UIs. And there it does pretty well, because the kernel just provides generic functionality cheaply. It’s a commodity backend that could be swapped with another commodify backend without any users knowing or caring. Hooray.
Sour grapes.
> Linux is the go to choice when you could just as well be using something else that’s really cheap, like BSD.
You actually couldn't be just as well using BSD. Corporations would love to be able to take Linux and not contribute their changes back (and that's frequently what happens when they use it internally but don't distribute it). They don't use a BSD licensed kernel in many such places (e.g., Android) because Linux is more advanced.
More advanced in terms of supported features and hardware.
Taking one off the top of my head that was relevant around the time Android was being developed, dynamic ticks which is important for low power operation. Linux supported this in 2007 about 5 years before FreeBSD and I think NetBSD still doesn't support it. Could not field a phone OS without that, at least not back in those days.
However, desktop Linux is where the product is 100% OSS. That’s the apples to apples comparison. And that’s where it can’t compete without vendors writing property code to put in front of it to make it actually work well.
Server side Linux gets a lot of support from professional programmers paid by big corps. They have improved it beyond hobbyist level, and it works pretty well. And of course cheap makes up for a lot.