Main Menu

Search

LINUX: How To Enable Particular Service Using "systemctl" Command To Auto Start During Reboot?

Below "systemctl" Command can be used to enable particular Service.
systemctl enable <service name>

For example if you want to enable Docket service to start when Linux Machine reboots, your "systemctl" command will look as follows:



systemctl enable docker

Once the service is enable run below command to verify that the service is enabled.

systemctl list-unit-files | grep -i <service>

For e.g. if you enabled Docker service, you can run below command to verify whether the Docker service is enabled.
systemctl list-unit-files | grep -i docker.

Below is example output of above command.
# systemctl list-unit-files | grep -i docker
docker.service          enabled


Products to which Article Applies


All Linux Operating Systems

Additional References

https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units

No comments:

Post a Comment