/usr/local/bin and so forth
Stijn Hoop
stijn at win.tue.nl
Thu May 8 04:55:34 PDT 2003
On Thu, May 08, 2003 at 05:46:22AM -0600, collins wrote:
> Coming from a linux background (gentoo distro), I find it strange to
> find all sorts of crap in /usr/local/bin.
It's not 'random crap', it should contain only what you installed using
ports or packages.
> I'm used to find all standard software in /usr/bin (or certain binary
> packages in /opt) and to find /usr/local/bin reserved for stuff added
> by the local administrator.
Arguably this is a shortcoming of the default setup for FreeBSD -- there
is no such place until you create one (eg, you can create /opt for truly
local software, but it's your own decision).
However, there are a few 'standard' solutions:
1) set PREFIX and LOCALBASE in /etc/make.conf to something other than
/usr/local (the default). I wouldn't try /usr/bin, in case you
overwrite some base system component, but /opt would be
good. 99% of the ports will then automatically install into this
directory. The drawback is that you will have to recompile all
currently installed ports, and binary packages will still install
into /usr/local.
2) turn your truly local software into a port or package. It's not
very hard to do this, see pkg_create(1) and the porters handbook.
This is my preferred way, everything I create can be tracked
using the standard tools, and I can even put my port skeletons
in CVS and upgrade very easily (see sysutils/portupgrade).
> 1. What's the rationale behind this for freebsd?
I think it's historical. Personally I think it's a good thing that ports and
package installs do not go into /usr/bin etc -- FreeBSD's strength is that it
has a completely usable system out of the box, and everything in /usr/bin is
by definition part of the base system. Use those in scripts and be sure to
find them on the next FreeBSD machine.
> 2. Where does one (as a standard) put truly local scripts, etc. so it
> won't get confused with all the stuff in /usr/local/bin?
See above.
HTH,
--Stijn
--
"What kind of a two-bit operation are they running out of this treehouse,
Cooper? I have seen some slipshod backwater burgs, but this place takes the
cake."
-- Special Agent Albert Rosenfield, "Twin Peaks"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030508/f4c6563f/attachment.bin
More information about the freebsd-questions
mailing list