CompTIA Linux+ (XK0-005) — Question 185
A junior administrator updated the PostgreSQL service unit file per the database administrator's recommendation. The service has been restarted, but changes have not been applied. Which of the following should the administrator run for the changes to take effect?
Answer options
- A. systemctl get-default
- B. systemctl daemon-reload
- C. systemctl enable postgresql
- D. systemctl mask postgresql
Correct answer: B
Explanation
The correct command to run is 'systemctl daemon-reload', as it instructs the system to reload the unit files and apply any changes made. The other options do not reload the configuration: 'systemctl get-default' shows the default target, 'systemctl enable postgresql' sets the service to start at boot, and 'systemctl mask postgresql' prevents the service from being started.