CompTIA Linux+ free question 1 / 10 · Domain 1: System Management
A small company runs one server that provides downloadable installer files and static pages for its own customers through FTP and HTTP. The administrator wants a top-level directory whose purpose is data that the machine serves to others, kept apart from the vendor packages. Which directory does the hier(7) manual page describe for that purpose?
- /sys, which is the mount point for the sysfs filesystem
- /opt, which holds add-on application packages that consist of static files
- /srv, which holds site-specific data that is served by this system
- /usr/local, which holds programs that are local to the site
Show the answer and explanation
Answer: C
Why this is correct
The hier(7) page describes the layout of the Linux filesystem hierarchy one directory at a time. For /srv it says the directory contains site-specific data that is served by this system. Installer files and static web pages that the machine delivers over FTP or HTTP are exactly that kind of data, so /srv is where the page puts them.
Why the other options are wrong
"/opt, which holds add-on application packages that consist of static files" … The manual page describes /opt as the place for add-on packages that contain static files. That is software the vendor ships, not the content a site hands out to its clients.
"/usr/local, which holds programs that are local to the site" … The page gives /usr/local to programs that are local to the site. It is for locally installed software, not for the data those programs serve.
"/sys, which is the mount point for the sysfs filesystem" … The page describes /sys as the mount point for the sysfs filesystem, which is a view of kernel objects. It is not a place to keep files that a service delivers to users.
Key points
Read each top-level directory by what it holds, not by how often you touch it: /srv is served data, /opt is add-on software, /usr/local is locally installed software, and /sys exposes kernel objects.
Go to the CompTIA Linux+ practice app (10 free questions; purchase unlocks all questions)