Hacker News new | past | comments | ask | show | jobs | submit login

Old Unix guy here: That is my understanding as well.

But then the question becomes, why not get rid of /usr?




This.

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.


Having the "immutable" parts of UNIX reside in a single directory is often useful. It can be mounted read-only, for example.


/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 / .


> /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.


> why not get rid of /usr?

To avoid breaking backward compatibility.


You could have links from /usr instead of from / , couldn't you?


I 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?)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: