News for hackers. Stuff that matters.
Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by Cthulhu_ on Wednesday May 11, 2022 @04:52AM (#31337420)
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.

Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by hnlmorg on Wednesday May 11, 2022 @06:00AM (#31337790)
> 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
Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by hpb42 on Wednesday May 11, 2022 @08:25AM (#31338893)
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

Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by stouset on Wednesday May 11, 2022 @02:49PM (#31344165)
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.

Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by watersb on Wednesday May 11, 2022 @07:25PM (#31347302)
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.

Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by xjrk on Wednesday May 11, 2022 @05:12PM (#31345839)
I've used to setup my system exactly like that, but that was in 20xx. Since then I've got lazy.
Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by salmo on Wednesday May 11, 2022 @11:20AM (#31341265)
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.

Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by red_trumpet on Wednesday May 11, 2022 @09:26AM (#31339625)
Same on my (X)Ubuntu 20.04.
Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by em500 on Wednesday May 11, 2022 @06:01AM (#31337797)
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/

Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by tombl on Wednesday May 11, 2022 @07:52AM (#31338552)
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

Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by jmclnx on Wednesday May 11, 2022 @09:48AM (#31339897)
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

Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by trasz on Wednesday May 11, 2022 @10:59AM (#31340939)
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.
Re:Understanding the bin, sbin, usr/bin, usr/sbin split (2010) by selimnairb on Wednesday May 11, 2022 @07:34AM (#31338396)
It’s called Darwin.