Category Archives: bin

FHS – /bin vs /libexec

I have recently been installing several projects from the Apache Software Foundation. In attempting to further setup my development environment, I have been navigating the project directory structures to gain a better understanding of the project as well as set my environment variables.

I am using Homebrew for my installations.

I notice there are often two subdirectories; bin and libexec. I also notice that libexec contains its own bin subdirectory. My questions are as follows:

  1. What are the differences between bin and libexec sub-directories? What about /bin and /libexec/bin?
  2. Given a project with such a structure, what is the best path for the project's $HOME environment variable?
  3. Bonus: What are the common best practices involved in setting $XXXX_HOME, modifying $PATH, setting the ~/.profiles for a new installation?

I notice that according to the Filesystem Hierarchy Standard, /bin is purposed for essential user command binaries. However, I find no reference in the document to /libexec only lib.