Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hypothetically speaking, would forking FreeBSD or a *nix to use a simpler folder structure be feasible? I can imagine a lot of package managers and applications make assumptions about the folder structure though, so there would have to be a lot of changes made to make everything work.

I was thinking "just symlink /sbin with /bin", but there would probably be conflicts.



> Hypothetically speaking, would forking FreeBSD or a nix to use a simpler folder structure be feasible?*

Not only feasible but it's been implemented a few times over the years. The most notable being GoboLinux[1][2], which is nearly 20 years old.

[1] https://en.wikipedia.org/wiki/GoboLinux

[2] https://gobolinux.org/

> I was thinking "just symlink /sbin with /bin", but there would probably be conflicts

Given how long /sbin et al have been around, there would always be some edge cases. However it is still possible to do. GoboLinux uses symlinks to achieve LFH[3] compatibility while still having friendly directory names. ArchLinux also just has one bin directory and uses symlinks for compatibility:

  » ls -l / | grep bin                                                                                                                                                                                   
  lrwxrwxrwx   1 root root              7 2021-12-07 02:41 bin -> usr/bin
  lrwxrwxrwx   1 root root              7 2021-12-07 02:41 sbin -> usr/bin

  » ls -l /usr | grep bin                                                                                                                                                                                
  drwxr-xr-x   5 root root 110,592 2022-05-06 09:23 bin
  lrwxrwxrwx   1 root root       3 2021-12-07 02:41 sbin -> bin
[3] https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard


ArchLinux symlinks /sbin, /bin and /usr/sbin to /usr/bin. And also /lib, /lib64, /usr/lib64 to /usr/lib:

$ ls -la / | grep -e bin -e lib lrwxrwxrwx 1 root root 7 Dec 6 23:41 bin -> usr/bin lrwxrwxrwx 1 root root 7 Dec 6 23:41 lib -> usr/lib lrwxrwxrwx 1 root root 7 Dec 6 23:41 lib64 -> usr/lib lrwxrwxrwx 1 root root 7 Dec 6 23:41 sbin -> usr/bin


I'm actually a bit surprised about `/bin` there. Maybe it's archaic but I've always considered the point of `/bin` to be a minimal set of tools that could allow an otherwise-hosed system to be booted/debugged. So it (and `/lib` and a few other directories) might be on a small, read-only partition while `/usr` and friends are on a much larger read-write partition.

Of course in the last twenty-five years I don't think I've ever really used a system set up like that. But it does seem nice to at least be able to do so.


IIRC, you are correct. And OpenBSD still sets up distinct partitions for `/bin` and `/lib` etc.

The first PC I built had 7 disk drives in a tower case, four distinct hard drives. Yes it was crazy. But the largest of these by far was 540 MB. It made sense to keep the boot stuff on its own hard drive.

Linux has `boot`, of course, but `boot` should never appear in $PATH. I think.


I've used to setup my system exactly like that, but that was in 20xx. Since then I've got lazy.


I think nearly all Linux distros did this when they adopted systemd. That’s where I first read this argument.

I know RHEL, Debian, and Arch do. Not a lot outside of those families.


Same on my (X)Ubuntu 20.04.


Why hypothetical, Gobo Linux[1] has already done it. Or if you want to just hide (rather than replace) the traditional Unix hierarchy from the user, you get macOS (inherited from NeXTSTEP).

The problem is that the actual benefits a pretty nebulous, so it's probably not worth the effort (and drawbacks of using different conventions than most others *nix users).

[1] https://www.gobolinux.org/


I'm pretty sure Gobo Linux functions partially like macOS does, hiding system directories, by removing them from readdir with a custom kernel module[0].

[0]: https://gobolinux.org/doc/articles/gobohide.html


Also FreeBSD (and other BSDs) usually mount /usr on its own partition. I think that causes issues in Linux these days. So yes, merging in the BSDs may be a big change.

FWIW, Slackware keeps the separate, following the Linux Standard Base.

https://en.wikipedia.org/wiki/Linux_Standard_Base


FreeBSD definitely doesn't create /usr as a separate filesystem by default. I think some people still do that, but I have no idea why.


It’s called Darwin.




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

Search: