Question 400
A RHEL 10 service administrator is responsible for rsyslog.service. The task is to start a service now and also enable it for future boots. Which systemd command should be used?
Explanation
Correct Answer
enable --now sets boot enablement and activates the unit immediately. That exactly matches the stated runtime/boot requirement. This matches the stated requirement to start a service now and also enable it for future boots. By contrast, the plausible alternative `systemctl is-active rsyslog.service` has the effect: is-active reports the active runtime state of the unit. This operates on a different service state or control property; that operation would not achieve the requested result.
Incorrect Answers
disable removes automatic startup links but need not stop the current process. This operates on a different service state or control property. The stated task is to start a service now and also enable it for future boots. Instead, `systemctl enable --now rsyslog.service` is the relevant alternative because enable --now sets boot enablement and activates the unit immediately. That exactly matches the stated runtime/boot requirement.
is-active reports the active runtime state of the unit. This operates on a different service state or control property. The stated task is to start a service now and also enable it for future boots. Instead, `systemctl enable --now rsyslog.service` is the relevant alternative because enable --now sets boot enablement and activates the unit immediately. That exactly matches the stated runtime/boot requirement.
is-enabled reads the service startup enablement configuration. This operates on a different service state or control property. The stated task is to start a service now and also enable it for future boots. Instead, `systemctl enable --now rsyslog.service` is the relevant alternative because enable --now sets boot enablement and activates the unit immediately. That exactly matches the stated runtime/boot requirement.






Red Hat Certified System Administrator (RHCSA) (EX200) Practice Tests