Live data from Hacker News

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

lists.busybox.net

71–80 of 158 posts

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

#71

Earlier quoted context omitted.

I'm curious, what is your opposition to `/usr/share`? It seems quite logical to me as a place to store non-executable, read-only, shareable data like man pages and other documentation, fonts, keymaps, color profiles, game data, etc. Where else would you propose to store this sort of thing? I can't really think of a different location in the hierarchy that would make sense.

Because everyone's idea of what "makes sense" is different. Thus: /bin /usr/bin /usr/share/bin /usr/share/local/bin /usr/local/bin /usr/local/share/bin /opt/bin /opt/some/clever/path/system/bin Followed by hacky symlinks so that programs can find what they're looking for in /usr/local/share/lib/x, which really resides in /usr/share/lib/x or maybe /var/lib or maybe /var/local/lib or maybe just /lib because it's consid…

You forget my favorites: /usr/libexec and /usr/lib/$progname

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

#72
post #26

Earlier quoted context omitted.

It would break FreeBSD's single user mode when using the defaults during installation for partitioning. FreeBSD's default install creates: /, /usr, /tmp, /var and swap space. When you boot in single-user mode all you get is / and nothing else. If everything was in /usr you wouldn't be able to mount /usr ... :P

Presumably if FreeBSD went down the same path as Fedora, they could also change the default partition layout.

Wouldn't that interfere with the core BSD system vs p ackage binaries/libs paradigm?

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

#73
post #60
post #44

Earlier quoted context omitted.

Except that /usr is where /usr/local lives (all software installed through the FreeBSD ports tree) and I don't want that on my / partition, so now I have to create a partition just for /usr/local? How about the various other files under /usr, they now have to be moved to / as well? On FreeBSD /usr also houses /usr/home. /home/ is a symlink to /usr/home! / on a FreeBSD system is generally kept small. It doesn't have s…

You can make a good case that /usr/local should be separate from /usr, where as /usr belongs on the same partition/slice as / on FreeBSD. /usr is the whole system as maintained by FreeBSD, where as /usr/local is where your ports are installed. /usr is going to grow slowly, /usr/local could get huge. Separate /usr/local out from /usr on a different disk. FreeBSD recommends softupdates on all filesystems, including /.…

The defaults for FreeBSD are / as UFS2 with no softupdates, see picture 2-19 in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/in... for an example.

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

#74
post #63

Earlier quoted context omitted.

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.

And in general, if you want to use any filesystem that your operating system supports but your bootloader does not, you need a /boot

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

#75

Earlier quoted context omitted.

Because everyone's idea of what "makes sense" is different. Thus: /bin /usr/bin /usr/share/bin /usr/share/local/bin /usr/local/bin /usr/local/share/bin /opt/bin /opt/some/clever/path/system/bin Followed by hacky symlinks so that programs can find what they're looking for in /usr/local/share/lib/x, which really resides in /usr/share/lib/x or maybe /var/lib or maybe /var/local/lib or maybe just /lib because it's consid…

Perhaps you have some misbehaving software, but I've never seen /usr/share/bin, or /usr/local/share/bin or a lib directory in either of those locations. I just checked FreeBSD boxes (which, admittedly, follow their own standards closely), and a Redhat box. var is a directory which may be found under /usr or /usr/local, but won't contain a local directory. Think of it as 3 roots: / is required for boot, /usr is stuff…

/usr is maintained by the OS, and contains stuff that isn't required for boot but to round out the system.

/usr/local is where local modifications to the OS go, these can be site-wide (company wide) and can be hosted on NFS for example for network boots. User installed stuff belongs in /usr/home//*. Users shouldn't have root access to install stuff in /usr/local.

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

#76

Earlier quoted context omitted.

Presumably if FreeBSD went down the same path as Fedora, they could also change the default partition layout.

Wouldn't that interfere with the core BSD system vs p ackage binaries/libs paradigm?

Packages/binaries/ports tree installs into /usr/local/.

See man hier [1].

For example, on a FreeBSD install, it is perfectly safe to rm -rf /usr/local/. Your system will still boot without issues.

[1] http://www.freebsd.org/cgi/man.cgi?query=hier&apropos=0&...

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

#77
post #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.

Why? What exactly does ip bring to the table that ifconfig doesn't have? Why am I required to learn YET another tool to do something that ifconfig has no problems doing.

On linux to configure a wireless device you have iwconfig and ifconfig. And you have to use each in a different order to get it work. Whereas in FreeBSD I have ifconfig and it does all of it.

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

#78
post #48

Earlier quoted context omitted.

A distribution that does just that is NixOS ( http://nixos.org/nixos/ ). It has to, because it's purely functional (new stuff shouldn't overwrite any of the old stuff) and it has to support several different versions of the same package being installed at the same time. It is awesome, especially the easy rollback and that you can specify an entire system with a recipe. Still, it feels strange for us who are used to m…

GoboLinux does it too. And for that matter, another "unixy" OS uses "bundles" to keep all of an apps files together instead of splattering them all over the OS: Mac OS X.

OS X isn't just "unixy", Snow Leopard is UNIX certified...

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

#80
post #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.

home directories iirc, lived in /u (/usr these days)
Post reply on HN