You build a monitoring utility from source and install it by hand, outside the distribution's package manager, as a plain binary with no bundled tree of its own. Under the FHS, which directory should the executable be installed into?
LPIC-1 Exam 101-500, objective 104. Devices, Linux filesystems, filesystem hierarchy standard hard
Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.
Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.
How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.
The options
Correct /usr/local/bin
Correct. The /usr/local hierarchy is reserved for software the local administrator installs, and it is deliberately kept clear of anything the distribution's packages own.
Not correct /usr/bin
Wrong. /usr/bin holds the non-essential binaries that the distribution's package manager owns. A hand-installed file there may be overwritten or reported as unowned at the next upgrade.
Not correct /bin
Wrong. /bin is for the essential commands needed by single-user mode and by boot and repair scripts, before other filesystems are mounted. A monitoring utility is not in that class.
Not correct /opt/bin
Wrong as stated. /opt holds self-contained add-on packages, each in its own /opt/<package> directory; /opt/bin is only reserved for local administrator use and is not where a compiled build belongs.
Why
The FHS separates directories by who owns their contents. The distribution owns /bin, /sbin, /usr/bin and /usr/sbin; the local administrator owns /usr/local, which mirrors the same bin, sbin, lib, share and etc structure beneath it; and /opt is for a third-party package that keeps its own self-contained tree under /opt/<package>. Keeping locally built software in /usr/local is what allows a package upgrade to run without colliding with it. The essential-versus-non-essential split is a second axis: /bin and /sbin hold what is needed before /usr is available.
Where this comes from
- Cited
- manual page hier(7)
Practise this
Reading one question is not practice. The trainer will draw a short set from objective 104 and space the ones you get wrong.
More questions on this objective
- A new disk /dev/sdb has no partition table at all. Which command writes an empty GPT partition table onto it without dropping you into an interactive editor? machine-checked
- You need the partition /dev/sdc1 on a USB stick to carry a FAT32 filesystem so that Windows machines can read and write it. Which command creates it? machine-checked
- You have just run `mkswap /dev/sdb2`. Which command makes the kernel start using that swap area immediately, without a reboot? machine-checked
- Why is it dangerous to run e2fsck against an ext4 filesystem that is currently mounted read-write? machine-checked
- On an ext4 filesystem at /dev/sda1 you want an automatic check to be forced after every 30 mounts. Which command sets that? machine-checked
- `df -h /var` reports the filesystem 100% full, but `du -sh /var` accounts for only about half that space. Nothing is hidden under a mount point. What is the most likely explanation? machine-checked
All questions on Devices, Linux filesystems, filesystem hierarchy standard