Find the FHS hierarchy for commands used by most users.
Which directory is appropriate?
/usr/bin contains most user commands. /usr/share is for architecture-independent data and /usr/lib for libraries.
Detailed explanation
/usr/shareIncorrect. /usr/share contains data rather than executable commands.
Incorrect. /usr/share contains data rather than executable commands.
/usr/libIncorrect. /usr/lib contains libraries.
Incorrect. /usr/lib contains libraries.
/usr/binCorrect. /usr/bin is the standard hierarchy for most user commands.
Correct. /usr/bin is the standard hierarchy for most user commands.
/var/libIncorrect. /var/lib contains variable application state.
Incorrect. /var/lib contains variable application state.
Try it yourself
An example you can run in a temporary verification environment.
test -d /usr/bin && printf '/usr/bin exists\n'Expected result
/usr/bin existsKey points
- /usr/bin is for user commands
- /usr/share is static shared data
- /usr/lib is for libraries
Notes
- Environment: FHS準拠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.