Filesystem Hierarchy Dr. Michael L. Collard 1
Many Types of Files Application programs System programs Libraries System configuration files Include files User data files Program configuration files Devices (i.e., /dev) Runtime information (i.e., /proc) Distribution-installed files and locally-installed files
Filesystem Hierarchy Standard directories (and filenames), and where they are located Historical precedents from Unix systems Each distribution could choose differently Consistency among various Unixes: important Consistency among various Linux distributions: more important
Filesystem Hierarchy Standard Defines main directories and contents of them for Linux Based on common practice in Unix Latest version 2.3 (Jan 29, 2004) Created by Free Standards Group – members include: HP, Red Hat, IBM, and Dell – Merged with OSDL in 2007: Linux Foundation – Where Linus works
FHS Although a standard, not all Linux distributions follow it completely (even some members) Because now part of a Linux initiative, some Unix-like systems have major differences – E.g., Mac OS X, directories /Home, /Library, and /Applications However, still a good starting point towards understanding
FHS Rationale Issues for installed files and directories – Software to predict – Users to predict General guidelines – shareable vs. unsharable, i.e., one more than one host or on one host – static vs. variable, i.e., do the contents change Reasons for this organization?
Important Directories / /boot /home /root /bin /lib /etc /tmp /dev /usr, /usr/bin, /usr/include, /usr/local, /usr/share /var, /var/log /opt
Changes to Historical Practice Historically, /usr and /etc had both static and variable files /var was created to store variable files Moved most of the variable files in /usr to /var Still working on moving variable files in /etc to /var