Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer
    
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 '11 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 '11 at 23:29
    
Is etc relative? –  Will03uk Jul 16 '11 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 '11 at 21:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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