4 ms·
Old Unix guy here: That is my understanding as well. But then the question becomes, why not get rid of /usr?
by mcguire 5y ago
Old Unix guy here: That is my understanding as well.
But then the question becomes, why not get rid of /usr?
- LeoPanthera 5y agoHaving the "immutable" parts of UNIX reside in a single directory is often useful. It can be mounted read-only, for example.
- einpoklum 5y ago/usr/local is not immutable, nor is /usr/share . Also, you could mount / as read-only, and mount the writable parts at different points, or using a UnionFS mount of / .
- LeoPanthera 5y ago> /usr/local is not immutable, nor is /usr/share Not technically, but I've built a number of "appliance" linux systems for clients, and to improve reliability I just make the entire disk read-only with the exception of /home and /var. The few locations outside of /var that sometimes need to be writable (in particular, /media, /mnt, and sometimes /root) can simply be symlinked into /var.
- musicale 5y ago> why not get rid of /usr? To avoid breaking backward compatibility.
- einpoklum 5y agoYou could have links from /usr instead of from / , couldn't you?
- deleted 5y ago[deleted]
- musicale 5y agoI think the path of least resistance is symlinking /usr/bin/ to /bin, but now that I think about it I think I misunderstood GP's suggestion. GP's idea, as I am now thinking about it it, is that you could basically move everything out of /usr into /, effectively getting rid of /usr. Symlinking /usr to / seems like a dubious idea (since we'd get weird things like /usr/etc/passwd) but turning all of its top-level directories into symlinks seems like a possibly OK idea. Looking at my ubuntu installation, /{bin,sbin, lib,lib32,libx32,lib64) are all links to /usr/{...}, which seems backwards to me. I think they should have hoisted everything into / and made /usr/* symlinks for backward compatibility. macOS still has a traditional BSD style /bin (37 utilities) and /usr/bin (1000+). (But why is /bin/sleep a 150K executable? maybe it's a fat binary in more ways than one?)
- einpoklum 5y agoThis. I just don't understand, if people want to merge /usr and /, why they insist on keeping the gratuitous /usr prefix. It can all just be rolled up into / : /bin, /sbin, /share, /lib, /include, /share, /src and so on.