LFCA · Question #4
After installing the package `postfix', what command would you run in order to ensure that Postfix is started on reboot?
The correct answer is D. svstemctl enable postfix. To ensure the postfix service starts automatically on system reboot in modern Linux distributions, the systemctl enable postfix command is used.
Question
After installing the package `postfix', what command would you run in order to ensure that Postfix is started on reboot?
Options
- A/etc/init.d/enable postfix
- Benable postfix on
- Cpostfix -onboot yes
- Dsvstemctl enable postfix
How the community answered
(55 responses)- A2% (1)
- B4% (2)
- C2% (1)
- D93% (51)
Why each option
To ensure the `postfix` service starts automatically on system reboot in modern Linux distributions, the `systemctl enable postfix` command is used.
`/etc/init.d/enable postfix` is not a standard command for enabling services in either old SysVinit or modern systemd systems.
`enable postfix on` is not a valid Linux command for service management.
`postfix -onboot yes` is not a valid command to configure the Postfix service for automatic startup; Postfix itself doesn't use this syntax for boot configuration.
The `systemctl enable` command is part of the systemd init system, which is standard in most current Linux distributions. This command creates symbolic links to ensure that the specified service, in this case `postfix`, is automatically started whenever the system boots up.
Concept tested: systemd service management (enabling services)
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_basic_system_settings/managing-services-with-systemctl_managing-basic-system-settings
Topics
Community Discussion
No community discussion yet for this question.