HEADS UP: /bin and /sbin are now dynamically linked

Erik Trulsson ertr1013 at student.uu.se
Mon Nov 17 07:23:59 PST 2003

On Mon, Nov 17, 2003 at 09:00:20AM -0500, Michael Edenfield wrote:
> * Erik Trulsson <ertr1013 at student.uu.se> [031116 23:21]:
> > On Sun, Nov 16, 2003 at 07:24:00PM -0700, Brent Jones wrote:
> > > This is just a case of OS evolution.  /sbin used to be the place where 
> > > the statically linked recovery things would be placed, in case the 
> > > shared libraries got hosed.  The only things that needed to be 
> > > statically linked though, were system utilities, which is why people 
> > > probably started to associate the "s" with system, rather than static.
> > > 
> > > When this happened, you started to see the duplicates that used to 
> > > exist in /bin (or /usr/bin) and /sbin disappear.  Since you still need 
> > > a place to have statically linked recovery utilities, /rescue was 
> > > created.  Now you see the duplicates in /bin (or /usr/bin) and /rescue 
> > > instead.
> > 
> > Do you have any references for this?  Every single place that I can
> > find explains /sbin as "system binaries".  I have also never heard of
> > there ever being duplicates in /bin of the files in /sbin.
> Also, wouldn't the names 'bin' and 'sbin' pre-date the existiance of
> dynamically linked binaries?

Yeah, that is what I thought too, but it does not seem to to be the
As far as I can tell (after using Google for quite a bit) shared
libraries were first introduced in Unix with SysVR3, with the model
currently in use first appearing in SunOS 4 (I have no idea what they
looked like in SysVR3.)  /sbin seems to have first appeared in SysVR4,
which postdates both of the above.
/sbin seems to have been introduced to BSD sometime between 4.3BSD and
(And SysVR4-derived systems seem to have /bin just as a symlink to
/usr/bin, with /sbin containing only what is needed to boot the system
far enough to mount /usr, with system binaries otherwise appearing in
/usr/sbin and normal user binaries in /usr/bin.  Solaris does
appear to have dynamically linked duplicates in /usr/sbin of the
statically linked programs appearing in /sbin.)

>  AFAIK the primary difference between the
> two was the /bin was typically in a user's PATH and /sbin was not.

This is apparently one of things that differ between SysV- and BSD-
derived systems.

<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se

More information about the freebsd-current mailing list