1. Related commands
1. View all system services
systemctl list-units --all --type=service
2. Query service status
systemctl status httpd.service
3. Query whether the service is started at boot
systemctl is-enabled crond.service
enabledYesdisabledNo
4. Set the service to boot state
systemctl enable service
A system link is automatically created
Created symlink from /etc/systemd/system/multi-user.target.wants/crond.service to /usr/lib/systemd/system/crond.service.
5. Set the service to boot and not start
systemctl disable crond
will automatically remove the system link
Removed symlink /etc/systemd/system/multi-user.target.wants/crond.service.
2. Set httpd to start automatically at boot
systemctl enable service
Just restart.