How do i check the status of a systemd managed service?



  • Tells you if it's enabled, active, some recent log entries, and other useful information.

    $ systemctl status cups
    ● cups.service - CUPS Printing Service
       Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
       Active: active (running) since Thu 2018-09-20 13:30:43 BST; 1 weeks 2 days ago
     Main PID: 1632 (cupsd)
        Tasks: 1
       CGroup: /system.slice/cups.service
               └─1632 /usr/sbin/cupsd -f
    
    Sep 20 13:30:43 centos-linux.shared systemd[1]: Started CUPS Printing Service.
    Sep 20 13:30:43 centos-linux.shared systemd[1]: Starting CUPS Printing Servi....
    Hint: Some lines were ellipsized, use -l to show in full.
    


© Lightnetics 2024