In centos, you can use the systemctl command to check whether the service is started at boot. This command can set or check the status of certain services. The syntax is "systemctl list-unit-files | grep program name".
The operating environment of this article: centos 6.4 system, Dell G3 computer.
Sometimes we want a service to start automatically at boot, but after setting it up, we don’t know whether it will succeed. We can use the following command to do it Check:
1. Check the startup items
systemctl list-unit-files
2. Check the startup status of some services
systemctl list-unit-files | grep 程序名称
3. Check in italics which services are started at startup
systemctl list-unit-files | grep enable
4. Set up auto-start
systemctl enable 程序名称
Recommended tutorial: "centos tutorial"
The above is the detailed content of How to check whether the service is started on boot in centos. For more information, please follow other related articles on the PHP Chinese website!