Which directories should I expect to have in an install prefix when I'm writing makefiles? I've noticed that in the common prefix /usr, there is no /etc, yet there is an /include dir, which isn't in the root directory. Which paths are hard-coded such as /etc and /var maybe and which directories lie in a prefix? As far as I can see /bin and /lib are standard.

1 Answer 1


See the FHS (Filesystem Heirarchy Standard) for details: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard and http://www.pathname.com/fhs/

  • So is etc/ and var/ always only in root and is include/ always only in usr/. Does everything else come under the prefix?
    – Will03uk
    Jul 14, 2011 at 23:12
  • It can, many common services when built locally will install to /usr/local/<application> beneath which they may create ./bin, ./lib, ./log and more. Some apps / services can be configured (by autoconf / automake) to install to the 'real' /bin, /lib etc...
    – Mike Insch
    Jul 14, 2011 at 23:29
  • Is etc relative?
    – Will03uk
    Jul 16, 2011 at 9:45
  • In some cases, but not necessarily all. Typically, ./bin is user binaries, ./sbin system binaries, ./lib shared libraries, /var for logfiles, lockfiles and other 'runtime' files, /etc for configuration files. automake / autoconf allow the user to specify paths for each of these, so a user may choose to use ./etc rather than /etc for a locally installed package if they wish.
    – Mike Insch
    Jul 16, 2011 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.