I've read that there is a different behavior between FreeBSD and Linux with the /usr/local, in FBSD ports are installed there, in Linux not, can someone explain more on this? I'd like to know where MacPorts are installed in OSX, and a list of the most significant differences between the FHS of those three OS (this is mainly what I'm looking for).

I've already made a research but I didn't find really much.




2 Answers 2


You can find the Filesystem Hierarchy Standard (FHS) version 2.3 at pathname.com/fhs. There is a section about the usr hierarchy. The FHS lists /usr/local as a required directory and writes:

local Local hierarchy (empty after main installation)

Furthermore FHS writes:

The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.

Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.

The different Linux distributions usually don't write software to /usr/local. Instead each file is placed into the filesystem according to the FHS.

If you install software from source (./configure && make && make install) without specific options this software copies itself usually to /usr/local.

The default directory for MacPorts is /opt/local. The MacPorts guide has a description of the internals.


The FHS is a Linux standard (which not all distributions follow, and which is hopelessly outdated in the GUI area at least). It is mostly codification of existing practice, as standards are prone to be. As such, you will find that other Unixy systems (BSD, Mac OS, the propietary Unices, Minix 3, ...) use similar conventions. The /usr/local hierarchy is very old, initially it used to hold locally developed software, then with propietary Unix it became customary to install non-vendor software there (including stuff downloaded from Usenet) to keep it apart, not interferring with system updates. The GNU project popularized this use, and codified it in its installation scripts as a default (GNU was the source for decent tools for Unix up to the '90ies; particularly irritating were typically braidead vendor compilers and develoment tools in general, bad/outdated versions of vi, and a dumb shell. Jokingly it was said that the first thing to do with a new e.g. Sun was GNU > /usr/local.).

   These kids today don't know the luxury of up to date, working
   tools they have at their fingertips, running on personal machines
   that would have been supercomputers in our day. For free.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .