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

Re: sbin

This was intended for the list but accidentally got sent to only lina.

---------- Forwarded message ----------
From: Chris Brennan <xaero@xaerolimit.net>
Date: Sun, Jan 1, 2012 at 12:01 PM
Subject: Re: sbin
To: lina <lina.lastname@gmail.com>

On Sun, Jan 1, 2012 at 11:42 AM, lina <lina.lastname@gmail.com> wrote:

Is it safe to add /sbin into PATH?

Why the default path not include /sbin,

Thanks with best regards,

Typically /bin is reserved for binaries executable by everyone on the system,
whereas /sbin is *typically* reserved for binaries that are executable by root
only, most of these would typically have the SETUID bit set for root as well,
to further prevent non-root users from running them. The same logic would 
extend to /usr/bin, /usr/sbin, and where the BSD's are concerned, 
/usr/local/bin and /usr/local/sbin


These two paths are set up and almost always linked to / (that being they 
reside on the same partition/slice as the root partition,) so then in the event
the system cannot mount anything but /, you will have a partially working 
environment that would contain statically built binaries, allowing you to fix 
what ever broke and move on.


These two paths are /typically/ used for normal system operation of 
system-related binaries.


Some Linux distro's utilize this, but it's the primary install location for 
BSD related OS's such as FreeBSD, NetBSD and/or OpenBSD (just
to name a few). Any user-installed packages, either from binary or 
source, would get installed to this location, the idea being that the
base system doesn't get cluttered and/or tainted by user-installed

> --
> Chris Brennan
> A: Yes.
> >Q: Are you sure?
> >>A: Because it reverses the logical flow of conversation.
> >>>Q: Why is top posting frowned upon?
> http://xkcd.com/84/ | http://xkcd.com/149/ | http://xkcd.com/549/
> GPG: D5B20C0C (6741 8EE4 6C7D 11FB 8DA8  9E4A EECD 9A84 D5B2 0C0C) 

Reply to: