Enable and start service

Enable at boot and start immediately in one command

systemctl enable --now myapp.service

tool
systemd26 commands
tags
systemd

More systemd commands

  • systemctl list-units --state=failed

    List all units that are in a failed state

  • systemctl daemon-reload && systemctl restart myapp.service

    Reload unit definitions and restart the service

  • systemctl edit myapp.service

    Create /etc/systemd/system/myapp.service.d/override.conf with partial overrides

  • systemctl cat myapp.service

    Print the full unit file including drop-ins

  • systemd-analyze blame | head -20

    Show top 20 units by initialization time

all 26 systemd commands