[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: why are there /bin and /usr/bin...

On Tue, 10 Aug 2010 03:15:35 -0600 Bruce Sass <bmsass@shaw.ca> wrote:
> /sbin and /usr/sbin, /lib and /usr/lib directories?
> AFAICT, the reason is so that a minimal but functional system is 
> guaranteed to exist so long as a local HDD with a root filesystem
> is available (which doesn't necessarily include /usr);

The true reason is that back in ancient days, hard drives were too
small to put everything in one place, so ancient Unix machines at Bell
Labs in the 1970s ended up with some programs on the root disk and
some on the same supplementary disk where the home directories were
typically put. This was not done with any great forethought, it was
simply a temporary expediency. Because / was on the boot disk, it was
necessary to make sure that every program needed for initial boot was
there, and thus some programs were more important to put in /bin and
the like.

By the early 1990s this was long since unneeded but people continued
to do it anyway, and in fact started to think it was done for
technical reasons rather than because of a simple lack of space in an
earlier era. At this point (2010), with all of the system files
fitting in under a dollar's worth of disk space, people tell
themselves quite elaborate "just so" stories about why the segregation
is maintained.

The /bin /usr/bin (and indeed, /usr altogether) distinction is now
rather obsolete, but people have gotten so used to it that it has
become an "Onion".

For those who don't know the term "Onion", I direct you to Primo
Levi's famous story of trying to figure out why an onion was thrown
into each vat of varnish being manufactured in the factory in which he
was hired as a chemist. No one knew why the onion was thrown
in. Eventually, it transpired that the onion was there as a crude
temperature indicator -- in the days before a thermometer was used,
the onion would sizzle when the varnish reached the right temperature
-- but even though it was long since not needed, people continued the
practice because they did not know it was not needed.

Most modern Unix systems would be fine if all files in /usr were in /,
with a compatibility symlink pointing /usr at / to provide for scripts
and other programs assuming things to be in /usr, but no one dares to
do it, because the "Onion" impulse is so strong.

Perry E. Metzger		perry@piermont.com

Reply to: