How to check if systemctl service is enabled
To check if a systemctl service is enabled, run
1 |
systemctl is-enabled SERVICE_NAME |
Example
1 2 3 |
[root@mail ~]# systemctl is-enabled memcached disabled [root@mail ~]# |
You can enable the service, so it run at boot with command
1 2 3 |
[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
1 |
systemctl list-unit-files | grep SERVICE_NAME_HERE |
Example
1 2 3 |
[root@ok ~]# systemctl list-unit-files | grep httpd httpd.service enabled [root@ok ~]# |