010-150 · Question #32
After installing a new package, in which directory are you most likely find its configuration file?
The correct answer is C. /etc. The /etc directory is the standard location for system-wide configuration files in Linux, as defined by the Filesystem Hierarchy Standard (FHS).
Question
After installing a new package, in which directory are you most likely find its configuration file?
Options
- A/lib
- B/conf
- C/etc
- D/usr
- E/opt
How the community answered
(53 responses)- A4% (2)
- B6% (3)
- C79% (42)
- D2% (1)
- E9% (5)
Why each option
The /etc directory is the standard location for system-wide configuration files in Linux, as defined by the Filesystem Hierarchy Standard (FHS).
/lib contains shared library files and kernel modules required for booting and running binaries, not configuration files.
/conf is not a standard directory in the Linux Filesystem Hierarchy Standard and does not typically exist on a Linux system.
According to the Filesystem Hierarchy Standard, /etc is designated for host-specific system configuration files. Package managers such as apt and yum install application configuration files here by convention (e.g., /etc/nginx/nginx.conf, /etc/ssh/sshd_config). This makes /etc the first place to look for a newly installed package's configuration.
/usr contains user-space programs, documentation, and read-only data, but not host-specific configuration files.
/opt is reserved for optional or third-party self-contained software packages; while some packages store data here, standard configuration still goes in /etc.
Concept tested: Linux Filesystem Hierarchy Standard /etc directory
Source: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s02.html
Topics
Community Discussion
No community discussion yet for this question.