Make a locally written executable reportctl available by command name to all users.
Keep it separate from distribution-managed package files.
Which location is conventional?
/usr/local/bin is the conventional location for locally installed commands and is commonly included in users' PATH.
Detailed explanation
/tmp/reportctlIncorrect. /tmp is temporary and is not normally a shared command location.
Incorrect. /tmp is temporary and is not normally a shared command location.
~/bin/reportctlIncorrect. ~/bin is specific to one user's home directory.
Incorrect. ~/bin is specific to one user's home directory.
/usr/local/bin/reportctlCorrect. /usr/local/bin is intended for local administrator-installed commands.
Correct. /usr/local/bin is intended for local administrator-installed commands.
/var/log/reportctlIncorrect. /var/log is for log data, not executable commands.
Incorrect. /var/log is for log data, not executable commands.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s\n' "$PATH" | tr ':' '\n' | grep -Fx /usr/local/bin || trueExpected result
PATHに含まれる環境では/usr/local/bin。最小環境では出力なしKey points
- /usr/local is for local additions
- bin contains commands
- PATH and execute permission still matter
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.