
Linux: Service Management with systemd
Checking Service Status In Detail The systemctl status command provides detailed information about a service, including it’s current state (active, inactive, failed), recent log entries, and reasons for failure if the service is not running. Example Command: sudo systemctl status apache2 #or httpd service sudo systemctl status httpd Output: iamyaash@pi5:~ $ sudo systemctl status firewalld.service ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/lib/systemd/system/firewalld.service; enabled; preset: enabled) Active: active (running) since Sun 2025-06-29 20:30:48 IST; 1s ago Docs: man:firewalld(1) Main PID: 7956 (firewalld) Tasks: 2 (limit: 9585) CPU: 279ms CGroup: /system.slice/firewalld.service └─7956 /usr/bin/python3 /usr/sbin/firewalld --nofork --nopid Jun 29 20:30:48 pi5 systemd[1]: Starting firewalld.service - firewalld - dynamic firewall daemon... Jun 29 20:30:48 pi5 systemd[1]: Started firewalld.service - firewalld - dynamic firewall daemon. The output includes: ...