How do you enable a service to start at boot in CentOS?
Learn how to enable a service to start at boot in CentOS by following simple steps. Ensure your services run automatically every time your system reboots.
To enable a service to start at boot in CentOS, you can use the systemctl
command. Here are the steps:
-
Open a terminal on your CentOS system.
-
Enable the service to start at boot:
sudo systemctl enable <service-name>
Replace <service-name>
with the name of the service you want to enable. For example, to enable the httpd
(Apache web server) service, you would run:
sudo systemctl enable httpd
- Verify that the service is enabled:
sudo systemctl is-enabled <service-name>
If the service is enabled, this command should return enabled
.
What's Your Reaction?