Systemd Tutorial: Practical Part
Systemd Tutorial: Practical Part $ systemctl cat sshd.service [Unit] Description=OpenSSH server daemon Documentation=man:sshd(8) man:sshd_config(5) After=network.target sshd-keygen.service Wants=sshd-keygen.service [Service] EnvironmentFile=/etc/sysconfig/sshd ExecStart=/usr/sbin/sshd -D $OPTIONS ExecReload=/bin/kill -HUP $MAINPID Type=simple KillMode=process Restart=on-failure RestartSec=42s [Install] WantedBy=multi-user.target [Unit] Section: Startup Order and Dependencies After field: if network.target or sshd-keygen.service needs to start, then sshd.service should start after them.
Correspondingly, the Before field defines which services sshd.service should start before.
Note that After and Before only involve startup order, not dependency relationships.