Use the below systemctl command to determine systemd version:
# systemctl --version
systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
#
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
#
All active services available on your system:
# systemctl list-units --type=service
# systemctl list-units --type=service
List all services including inactive services simply execute:
# systemctl list-units --type=service --all
# systemctl list-units --type=service --all
Will list currently running/failed services
# systemctl | grep running
# systemctl list-units --type=service --state=running/failed
# systemctl list-units --type=service | grep running/failed
# systemctl | grep running
# systemctl list-units --type=service --state=running/failed
# systemctl list-units --type=service | grep running/failed
Systemctl to Manage Systemd services & its unit:
# systemctl list-unit-files --a
# systemctl list-unit-files --all
# systemctl list-unit-files --a
# systemctl list-unit-files --all
Will list all enabled loaded units
# systemctl list-unit-files | grep enabled
# systemctl list-unit-files --state=enabled
# systemctl list-unit-files | grep enabled
# systemctl list-unit-files --state=enabled
Ref:
https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
How to Manage ‘Systemd’ Services and Units Using ‘Systemctl’ in Linux
https://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/
Comments