8
Filesystem Hierarchy Dr. Michael L. Collard www.sdml.info/collard www.sdml.info/collard/linux [email protected] 1

Filesystem Hierarchy Dr. Michael L. Collard [email protected] 1

Embed Size (px)

Citation preview

Page 1: Filesystem Hierarchy Dr. Michael L. Collard   collard@cs.kent.edu 1

Filesystem Hierarchy

Dr. Michael L. Collardwww.sdml.info/collard

www.sdml.info/collard/[email protected]

1

Page 2: Filesystem Hierarchy Dr. Michael L. Collard   collard@cs.kent.edu 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

Page 3: Filesystem Hierarchy Dr. Michael L. Collard   collard@cs.kent.edu 1

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

Page 4: Filesystem Hierarchy Dr. Michael L. Collard   collard@cs.kent.edu 1

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

Page 5: Filesystem Hierarchy Dr. Michael L. Collard   collard@cs.kent.edu 1

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

Page 6: Filesystem Hierarchy Dr. Michael L. Collard   collard@cs.kent.edu 1

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?

Page 7: Filesystem Hierarchy Dr. Michael L. Collard   collard@cs.kent.edu 1

Important Directories• /• /boot• /home• /root• /bin• /lib• /etc• /tmp• /dev• /usr, /usr/bin, /usr/include, /usr/local, /usr/share• /var, /var/log• /opt

Page 8: Filesystem Hierarchy Dr. Michael L. Collard   collard@cs.kent.edu 1

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