systemctl

Service files

To list all services run

systemctl -a

List all enabled services

systemctl list-unit-files | grep enabled

See all running services

systemctl | grep running

See see dependency for a package, run

systemctl list-dependencies --reverse PACKAGE_NAME

systemctl list-dependencies

Service file location

service files are located in /usr/lib/systemd/system

[root@web-0001 system]# pwd
/usr/lib/systemd/system
[root@web-0001 system]# ls -l | grep php
-rw-r--r--  1 root root  507 Jul  6  2017 php56-php-fpm.service
-rw-r--r--  1 root root  502 Jan  3 06:55 php72-php-fpm.service
-rw-r--r--  1 root root  467 Jun  7  2017 php-fpm.service
[root@web-0001 system]# 

Systemd unit types

systemctl -t help
systemctl -t timer
systemctl -t service
Need help with Linux Server or WordPress? We can help!

Leave a Reply

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