Place read-mostly user programs and data that can be shared by multiple hosts.
The content is not host-specific configuration or changing state.
Which hierarchy is most appropriate?
/usr contains major userland programs, libraries, and shareable read-mostly data.
Detailed explanation
/varIncorrect. /var contains variable data.
Incorrect. /var contains variable data.
/etcIncorrect. /etc is for host-specific configuration.
Incorrect. /etc is for host-specific configuration.
/usrCorrect. /usr is the standard hierarchy for shareable userland software and data.
Correct. /usr is the standard hierarchy for shareable userland software and data.
/runIncorrect. /run contains transient runtime state.
Incorrect. /run contains transient runtime state.
Try it yourself
An example you can run in a temporary verification environment.
find /usr -maxdepth 1 -type d -printExpected result
/usr/bin、/usr/lib、/usr/share等Key points
- Shareable
- Read-mostly
- Userland
Notes
- Environment: FHS 3.0/Linux
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.