How to check if systemctl service is enabled

To check if a systemctl service is enabled, run

systemctl is-enabled SERVICE_NAME

Example

[root@mail ~]# systemctl is-enabled memcached
disabled
[root@mail ~]#

You can enable the service, so it run at boot with command

[root@mail ~]# systemctl enable memcached
Created symlink from /etc/systemd/system/multi-user.target.wants/memcached.service to /usr/lib/systemd/system/memcached.service.
[root@mail ~]# 

To check if a service is enabled to start on boot, run

systemctl list-unit-files | grep SERVICE_NAME_HERE

Example

[root@ok ~]# systemctl list-unit-files | grep httpd
httpd.service                                 enabled 
[root@ok ~]# 
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *