The basic filesystem layout and purpose is as follows:

Where possible, we prefer to put non-boot-critical applications in /usr rather than /. If a program is not needed in the boot process until after filesystems are mounted then it generally does not belong on /.

Any binary which links against a library under /usr must itself go into /usr (or possibly /opt).

The /opt top-level should only be used for applications that do not conform to the standard filesystem layout. This particularly includes prebuilt software packages that expect being installed in a single directory.

The /usr/local hierarchy is for non-Portage software. Ebuilds must not attempt to put anything in here.

The /usr/share directory is for architecture independent application data which is not modified at runtime.

Try to avoid installing unnecessary things into /etc — every file in there is additional work for the system administrator. In particular, non-text files and files that are not intended for system administrator usage should be moved to /usr/share.


Gentoo does not consider the Filesystem Hierarchy Standard to be an authoritative standard, although much of our policy coincides with it.