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.
1. What are the conceptual and structural differences between a Linux-Kernel and a BSD-kernel?
Regarding architecture and internal structures, there are of course differences on how things are done (ie: lvm vs geom, early and complex jail feature for FreeBSD, ...), but overall there are not that much differences between the two:
- BSD* kernel and Linux kernel have both evolved from a purely monolithic approach to something hybrid/modular.
Still, there are fundamental differences in their approach and history:
- BSD-kernel are using BSD licence and Linux-kernel is using GPL licences.
- BSD-kernel are not stand-alone kernels but are developed as being part of a whole. Of course, this is merely a philosophical point of view and not a technical one, but this give system coherence.
- BSD-kernel are developed with a more conservative point-of_view and more concern about staying consistent with their approach than having fancy features.
- Linux-kernel are more about drivers, features, ... (the more the better).
As greatly stated somewhere else:
It is Intelligent Design and Order (BSD*) versus Natural Selection and Chaos (GNU/Linux).
2. In which scenarios would one kind of kernel have an advantage over the other?
About their overall structure and concept, while comparing an almost vanilla Linux-kernel and a FreeBSD-kernel, they are more or less of the same general usage level, that is with no particular specialization (not real-time, not highly paralleled, not game oriented, not embedded, ...).
Of course there are a few differences here and there, such as native ZFS support or the geom architecture for FreeBSD versus the many drivers or various file-systems for Linux. But nothing some general software such as web servers or databases would really use to make a real difference. Comparisons in these cases would most likely end in some tuning battle between the two, nothing major.
But, some would argue that OpenBSD has a deep and consistent approach to security, while hardened Linux distributions are "just" modified versions of the vanilla Linux-kernel. This might be true for such heavily specialized system, as would Steam-OS be the number one to play games.
3. Are there any joint efforts to concentrate forces for one common kernel or certain modules?
There is no joint effort to concentrate forces for one common kernel, as there are major licences, philosophical or approach issues.
If some real common efforts exist such as OpenZFS, most of the time it is more about drivers and concepts taken or inspired from one another.
Best Answer
You will notice differences certainly. Most noticable will be differences in the standard userland utilities. FreeBSD does not use GNU ls, GNU cp, and so on. For example, if you're attached to a colorized ls, you may want to alias ls to "ls -G". It does use GNU grep, though. The default shell is a much simpler and less bloated shell than GNU Bash, which is the default on most Linux distributions. If you are attached to bash, that may be one of the first packages you will want to install. The ports system has been the standard way to install software on the various BSDs. Ports downloads the source code, builds it, and then installs it. It's nearly entirely automatic. To install bash, for example, do this as root:
If you don't do a make clean at the end, you will leave the built source code lying in the ports tree. Many ports have pre-built packages that can be downloaded if you prefer not to waste time building it and don't need to customize it. To install bash as a package, this should do it:
You can find most any common program in ports including Gnome 3, sudo, rsync, or what ever else you need. A great website for navigating ports is FreshPorts. You also should get familiar with the FreeBSD Handbook.