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

WBOY
Release: 2022-02-08 16:33:08
Original
8764 people have browsed it

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
Copy after login

2. Check the startup status of some services

systemctl list-unit-files | grep 程序名称
Copy after login

3. Check in italics which services are started at startup

systemctl list-unit-files | grep enable
Copy after login

4. Set up auto-start

systemctl enable 程序名称
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!