Linux system boot scripts Which directory typically contains the core system boot scripts and initialization configuration (for example, init, init.d, rc*.d, or system-level service files)?
-
A/dev
-
B/bin
-
C/etc
-
D/home
-
ENone of the above
Answer
Correct Answer: /etc
Explanation
Introduction / Context:System initialization and service startup on UNIX/Linux are driven by configuration and scripts located in well-defined directories. Administrators often need to adjust service runlevels, enable/disable units, or modify default parameters at boot. Knowing the correct location simplifies these tasks.
Given Data / Assumptions:
- Traditional SysV init placed scripts in /etc/init.d and symlinks in /etc/rc*.d.
- Modern systems using systemd still keep core configuration under /etc (e.g., /etc/systemd/system).
- We are asked for the directory that contains boot script configurations.
Concept / Approach:/etc is the configuration hub. For SysV init, /etc/init.d and rc directories hold boot scripts. With systemd, unit overrides and local service files reside in /etc/systemd/system. Other directories serve different purposes and do not primarily store boot-time configuration scripts.
Step-by-Step Solution:Recognize /etc as the home for system configuration.Identify init components (init.d, rc*.d) or systemd units under /etc hierarchy.Exclude directories unrelated to boot configuration.Select /etc.
Verification / Alternative check:List /etc/init.d or /etc/systemd/system on a running system to observe service and boot files. Compare with /usr/lib/systemd/system for vendor defaults versus /etc for admin-defined overrides.
Why Other Options Are Wrong:/dev contains device nodes./bin stores essential user binaries, not boot scripts./home contains user directories, not system boot configuration.
Common Pitfalls:
- Editing files under /usr/lib/systemd/system instead of placing overrides in /etc/systemd/system.
- Deleting rc symlinks without understanding runlevels.
- Confusing boot scripts with kernel bootloader configs (which are under /boot).
Final Answer:/etc