Home >Operation and Maintenance >CentOS >How to check whether the service is started on boot in centos

How to check whether the service is started on boot in centos

WBOY
WBOYOriginal
2022-02-08 16:33:088882browse

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".

How to check whether the service is started on boot in centos

The operating environment of this article: centos 6.4 system, Dell G3 computer.

How to check whether the service is started on boot in centos

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn