Comment by M95D
4 days ago
Sometime around 2000 someone decided that /bin and /sbin isn't enough to boot and mount the rest of the system, so they added further complexity: an initrd/initramfs that does the basic job of /bin and /sbin. They had to complicate the kernel build process, the kernel update, the bootloader, the kernel command line and for what? Just because they didn't want the kernel to have the storage drivers built-in?
So the /bin /sbin became redundant.
Sometime around 2020 someone observed that no current Linux can boot without /usr anyway. So what did they do? Move everything from /usr to / and drop the whole /usr legacy? Noooo, that would be too simple. Move / to /usr. And because that is still too simple, also move /bin, /sbin and /usr/sbin to /usr/bin, and then keep symlinks at the old locations because who's gonna fix hardcoded paths in 99% of all Linux apps anyway??
Oh, how I wish I was born in the '60s, when the world was still sane.
> Oh, how I wish I was born in the '60s, when the world was still sane.
As one who was, I find it makes the current world even harder to accept. Be careful what you wish for.
/ has to be writeable (or have separate writeable mounts under it), /usr doesn't. The reasons for unifying under /usr are clearly documented and make sense and it's incredibly tedious seeing people complain about it without putting any effort into understanding it.
Documented where?
https://www.freedesktop.org/wiki/Software/systemd/TheCaseFor..., for example
1 reply →
If you had been born in the 1960s, you might well have learned by dint of being alive at the time that the world underneath /usr was pretty complicated in the 1970s, 1980s, and 1990s; that /etc was where some of the things that were used to boot the system once went; and that the tale of sbin is complex and slightly sad.
The tale that things were simple until they went to pot in 2000 is wholly ahistoric.
This is busybox, not the general linux distros.
busybox in Alpine Linux has for example `ps` builtin. If you install ps with `apk add ps` to get the full version, it will remove the symlink for /bin/ps and replace it with the one you installed.
You need to read up on the purpose of busybox. It is not something that the kernel people has decided upon. It is an initiative of an group of people who needed some tools onto a single floppy.
/bin/ps on a Debian distro is 154522 bytes. The whole busybox in Alpine Linux is 804616 bytes and contains a whole lot more than just ps.
https://en.wikipedia.org/wiki/BusyBox https://busybox.net/
No, it's not (just) Busybox. Quotes from Gentoo: https://wiki.gentoo.org/wiki/Merge-usr
> merge-usr is a script which may be used to migrate a system from the legacy "split-usr" layout to the newer "merged-usr" layout as well as the "sbin merge".
> It is required for systemd ≥255 due to changes upstream, but it remains optional for other init systems.
The next logical evolution is to get rid of directories and put everything in /. This will simplify a lot of the build process. /usr/include and /usr/lib are already a mess (on linux).
> So what did they do? Move everything from /usr to / and drop the whole /usr legacy? Noooo, that would be too simple.
It's a lot simpler to merge them in a directory that can be mounted across multiple machines than have four separate mountpoints.
Mount-points were key to early history of the split. Nowadays it's more about not breaking shebangs.
Nearly every shell script starts with "#!/bin/sh", so you can't drop /bin. Similarly, nearly every python script starts with "#!/usr/bin/env python", so you can't drop /usr/bin.
Hence symlink.
And you haven't even touched upon paths used by Snap and Flatpak.