Enable and start a service

Turn on start at boot and start the service now with one command

systemctl enable --now myapp.service

tool
systemd26 commands
tags
systemd

More systemd commands

  • systemctl list-units --state=failed

    List all units in the failed state

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

    Reload unit files and restart the service

  • systemctl edit myapp.service

    Open /etc/systemd/system/myapp.service.d/override.conf in an editor for partial overrides

  • systemctl cat myapp.service

    Print the full unit file, including drop-ins

  • systemd-analyze blame | head -20

    Show the 20 units that took the longest to start

all 26 systemd commands