[Linux-disciples] /usr/bin v. /usr/local/bin

Adam Rosi-Kessel adam at rosi-kessel.org
Fri Sep 30 09:49:05 EDT 2005


Nothing that is not from Debian should be in /usr/bin. /usr/local/bin is for
stuff that is not in the distribution you are using. "Local" in this sense
means "particular to this installation" -- it has nothing to do with
physical architecture or how something is mounted.

There's a package (forget the name, think I forwarded it to you once), that
checks all of the standard directories (/usr/bin /usr/share etc.) and makes
sure that every file belongs to an installed package, and that each has an
MD5 sum that matches the package's checksum list. It's important to maintain
this integrity for security/upgradability/etc. purposes.

(Another example of the problem with putting your own thing in /usr/bin is
that it could get overwritten by an upgrade if it corresponds to the name of
a file in a real package).

Usually, people put /usr/local/bin ahead of /usr/bin in their $PATH, but
there are reasons to go the other way, as well.

Stephen R Laniel wrote:
> Someone enquired on the debian-user list where he should put
> a script that he wants to be accessible to all users. I
> replied that I thought /usr/bin was the canonical answer
> there. A few others replied that /usr/local/bin would be the
> way to go.
> 
> Now, hier(5) says
> 
>        /usr/local
> 	      This is where programs which are local to the site typically go.
> 
>        /usr/local/bin
> 	      Binaries for programs local to the site.
> 
> This isn't so clear to me: what does 'local to the site' in
> this case mean? Is the idea that /usr/bin might be
> NFS-mounted, so that the binaries might exist on another
> machine, whereas /usr/local/bin is always guaranteed to be
> here on this hard drive? And if that's what it means, what
> does this have to do with making a script available to all
> users?
> 
> Can someone clarify the role of /usr/local for me?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050930/95bfc7f1/signature.pgp


More information about the Linux-disciples mailing list