Interview Prep/Linux/Processes, Signals & systemd

Requires vs Wants vs After in systemd?

AdvancedConceptProcesses, Signals & systemd
Answer

Wants= and Requires= are dependency directives: they pull other units in. Wants is weak (failure is tolerated); Requires is strong (if the dependency fails to start or is stopped, this unit is stopped too). After=/Before= are ordering only; they do not pull anything in. So you almost always pair them: Wants=network-online.target plus After=network-online.target. BindsTo= is stronger than Requires and also stops when the dependency disappears.

All Linux questions Roadmap: Linux

More on Processes, Signals & systemd