Filesystem Hierarchy Standard (Lesson Plan)
The Filesystem Hierarchy Standard "consists of a set of requirements and
guidelines for file and directory placement under UNIX-like operating systems."
To predict the location of installed files and directories,
and to place new files and directories where software expects.
- Introduction (3 min)
- enables software developers and users to predict pathnames
- specifies file and directory names
- provides rationale
- specifies requirements
- specifies options
- Filesystem Hierarchy Standard (20 min)
- Basics
- shareable/unshareable, static/variable (3 min)
- /usr
- /opt
- /etc
- /boot
- /var
- Requirements vs Specific Options (3 min)
- Requirements must be present with the specified name.
- Specific Options may be present with the specified name or
totally absent, but may not be misnamed
- Root Filesystem (1 min)
- boot
- recovery and repair
- restore
- /usr (2 min)
- raison d'etre
- shareable
- static
- Specific Options
- /opt/<package> or /opt/<provider> (3 min)
- /usr/local (2 min)
- /usr/share (3 min)
- Extras (3 min)
- /proc
- /var/lock
- /var/spool
- Usage (5 min)
- Consult each time
- Start at Table of Contents
- Check details
- Summary (5 min)
- Consult every time
- Requirements vs Specific Options
- static/variable/shareable/unshareable
- Prelecture Handouts
- media (1 of the following)
- laptop
- web server
- vga projector
- vga connector with correct ends
- transparencies
- masters
- transparencies
- pointer
- markers and blanks
- transparency projector
- handouts
- masters
- copies
- whiteboard
- markers
Application configuration cannot be in /etc.
FHS-2.3 reserves /etc for "system configuration".
Application configuration should be in /etc/opt/<package>.
Note that this deprecates FHS-2.2 usage by farms.
X11 files should be under /[etc usr]/X11.
Because of historic usage, FHS-2.3 specifically exempts X11 from the
requirement to reside under /opt.
Before
- Reread FHS-2.3.
- Recognize changes from FHS-2.2.
During
- Propose questions that students can ask to determine where paths
should appear.
- Flip to online FHS copy as necessary.
- Ask students for examples.
Post
Prerequisite
- If feasible, student should plan to bring a FHS-compliant system.
- Student needs acquaintance with posix and familiarity with posix pathnames.
During
- If feasible, skim appropriate FHS sections.
- Examine current system if available.
Post
- Read full FHS.
- Locate and correct non-compliance in owned systems.
- (Rote) Student knows FHS is Filesystem Hierarchy Standard.
- (Application) Student can find
- boot files in /boot
- config files in /etc
- package files in /opt/<package>
- variable files in /var
- (Understanding) Student recognizes
- shareable vs unshareable
- static vs variable
- non-OS - /opt/package-or-provider
- architecture-independent - /usr/share