A system administrator wants to ensure that the syslog service starts automatically on boot and is running immediately without a reboot. Which command sequence should be used?
Trap 1: systemctl start syslog && systemctl enable syslog
Order reversed; start before enable still requires enable separately.
Trap 2: systemctl start --enable syslog
Invalid option combination; --enable does not exist.
Trap 3: systemctl enable syslog && systemctl start syslog
This works but is not the single-command best practice; enable does not start immediately.
- A
systemctl start syslog && systemctl enable syslog
Why wrong: Order reversed; start before enable still requires enable separately.
- B
systemctl start --enable syslog
Why wrong: Invalid option combination; --enable does not exist.
- C
systemctl enable syslog && systemctl start syslog
Why wrong: This works but is not the single-command best practice; enable does not start immediately.
- D
systemctl enable --now syslog
The --now flag enables and starts the service in one step.