Live data from Hacker News

Understanding the bin, sbin, usr/bin , usr/sbin split

lists.busybox.net

61–70 of 158 posts

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#61

The FHS (Filesystem Hierarchy Standard) [1] is the go-to reference for this sort of thing. It explains that `/bin` is for binaries that are essential before other file systems are mounted (e.g. in single user mode), and `/usr/bin` is for "most user commands" (all others). This allows you to keep a minimal local filesystem containing only the binaries needed for init to get the system running, and then `/usr` can be m…

`quote'

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#62
post #18

Earlier quoted context omitted.

It annoys the hell out of me that people are still imposing the 486-era 1024Cyl and 8GB limitations in 2012. ArchLinux, for example, still really, really wants you to make a /boot.

There are plenty of good reasons to make a /boot. Encrypted laptops for example.

Excellent point, I forgot that use case.

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#63
post #18

Earlier quoted context omitted.

It annoys the hell out of me that people are still imposing the 486-era 1024Cyl and 8GB limitations in 2012. ArchLinux, for example, still really, really wants you to make a /boot.

There are plenty of good reasons to make a /boot. Encrypted laptops for example.

I ran into problems when /boot was part of the larger xfs filesystem, so had to create an ext3 /boot instead.

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#64

Wow. As someone who was there (I know dating my self here) reading this is kind of like that scene in Sleeper where the person from the future is trying to understand artifacts from the past. So during the BSD / System V merge (project Lulu at Sun) the /opt filesystem was introduced as a way to keep 'packages' separate from 'system'. The difference between /bin and /sbin was that sbin was 'static-bin' which is to say…

I also have no memory of /home even existing in roughly the first decade of Unix's existence.

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#65
post #35

It drives me crazy every time I'm on a Linux system and ifconfig is in /sbin, and not on users' PATH, even though the no-argument form works perfectly fine as a user.

use 'ip' instead, ifconfig is deprecated. 'ip addr show' is the simple replacement for 'ifconfig', but ip is pretty flexible in what it can do.

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#66
post #46

And why / /usr split still makes sense: If it's needed to boot, it goes in root: boot images (including root filesystem) can be initrds, bootp images, flash sticks, or other similar tools. Maintaining the discipline of keeping what you need in / and what you don't need to boot in /usr helps when you're trying to minimize boot images, troubleshoot, and/or just simply keep things comprehnsible. Different partitions can…

For those who haven't seen the proposal for the / /usr merge: "Fedora (and other distributions) have begun work on getting rid of the separation of /bin and /usr/bin, as well as /sbin and /usr/sbin, /lib and /usr/lib, and /lib64 and /usr/lib64. All files from the directories in / will be merged into their respective counterparts in /usr, and symlinks for the old directories will be created instead" http://www.freedes…

Thanks. These seems like one of those things that while it might be sensible, wouldn't provide much of a win, so why bother with the mess?

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#67
I've been liking the new location /srv, where you stick things that are custom to that machine. No more trying to guess where the previous admin thought files should go (/usr/share? /usr/local? /usr/foo?).

http://www.linuxtopia.org/online_books/linux_beginner_books/...

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#68
Alas, sbin is not always true to its name.

Though static-linking was originally used for a different purpose, today statically linked binaries make my life easier, and it has nothing to do with space constraints.

Paths are a pain in the neck. It feels like 90% of the work we have to do at the prompt is typing/automcompleting paths, or symlinking or setting env variables to deal with paths.

We certainly need a way to differentiate "system" stuff from "user" stuff. And on BSD, one can do this with the mtree spec files. mtree is one of my favourite utilities. One that is of course absent in Linux.

Linux could never have an mtree because its userland development has been too haphazard. Moreover, different "distros" are always pushing for idiosyncratic changes. The goalposts move much more frequently than with BSD.

Moving goalposts are also a pain in the neck.

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#69

Wow. As someone who was there (I know dating my self here) reading this is kind of like that scene in Sleeper where the person from the future is trying to understand artifacts from the past. So during the BSD / System V merge (project Lulu at Sun) the /opt filesystem was introduced as a way to keep 'packages' separate from 'system'. The difference between /bin and /sbin was that sbin was 'static-bin' which is to say…

> The fact that Linux starts up differently is because Linux never was UNIX they are two different OSes, pretty much from the ground up.

No, it really has nothing to do with that at all. Linux can boot in pretty much the same way the genetic Unixes do, and in fact did for a long time. initrd and then initramfs came later and took some time to become widely used. Historically, Linux just mounted whatever filesystem the bootloader told it to as /, and executed init, which usually followed either a BSD or System V model, depending on distribution.

Linux evolved. Lots of things evolved. The filesystem layout, unfortunately, has merely become more chaotic.

Re: Understanding the bin, sbin, usr/bin , usr/sbin split

#70

Earlier quoted context omitted.

Every one of those paths I mentioned are paths I have encountered during my use of various unix distributions since 1991 (Solaris was the worst offender). And that's not even the complete list. I gave up trying to predict where software would install to a long time ago. My point is that what "makes sense" is subjective. Each developer/distro manager who made one of those paths thought to himself "it makes perfect sen…

Your encountering them doesn't make them part of FHS. Their being included in FHS does.

Most of us are more concerned about the real world than a "standard" that is routinely ignored.
Post reply on HN