Systemd by Example (2021)
Systemd’s power and complexity divide Linux users, with many praising its timers, logging via journalctl, and unified service management, while others struggle with its learning curve, race conditions, and perceived violation of traditional Unix philosophy. Commenters highlight how good reference documentation, tutorials, playgrounds, and even LLMs can make creating units, timers, and sandboxed services productive, especially compared to legacy init systems and ad‑hoc cron setups. Critics counter that its baroque behavior, opaque defaults, and tight coupling to Linux APIs make it harder to debug, less portable, and sometimes overkill for embedded or simpler use cases.
Overview
- Thread discusses a tutorial series on systemd, using it as a springboard for broader debate on systemd’s strengths, complexity, and philosophy.
- Many find the series unusually clear and helpful for building a mental model of units, jobs, and dependencies.
Learning Systemd
- The example-based series and an online playground are praised as making systemd less intimidating.
- Some emphasize that systemd’s man pages are excellent as references but not good tutorials.
- A few note that LLMs are surprisingly effective for generating unit files and timers.
Systemd Timers vs Cron
- Several users strongly prefer systemd timers:
- Clear separation of “what runs” vs “when it runs.”
- More readable time expressions (“hourly”, calendar syntax) and easier debugging via
systemctl statusandjournalctl.
- Others argue cron is simpler and more portable across Unix-like systems, and that some cron implementations already have
@hourly-style shortcuts. - Debate over whether systemd timers are actually “more portable,” with one side limiting “portability” to Linux, the other insisting it should mean multiple OS families.
UX: systemctl / journalctl
- Many sysadmins like the unified logging: no need to chase files under
/var/log;journalctl -u serviceis seen as powerful, especially with verbose/json modes. - Others find the CLI UX “baroque” or unintuitive:
- Subcommand help behavior and overloaded commands (e.g.,
journalctlboth paging and log management) frustrate some. - Binary logs plus unfamiliar options erode confidence that they’re seeing all relevant output.
- Subcommand help behavior and overloaded commands (e.g.,
- There’s acknowledgment that habits and familiarity heavily influence which approach feels “simpler.”
Complexity, Philosophy, and Adoption
- Pro-systemd voices:
- Emphasize sandboxing, dependency handling, logging, and unified service management.
- Argue that systemd is now the de facto standard on major Linux distros and that “Unix philosophy” is less relevant than practical reliability and deadlines.
- Critical voices:
- See systemd as over-complex, “OS-like,” hard to reason about in edge cases (e.g., shutdown ordering, embedded networking races).
- Prefer simpler init systems or shell-based init scripts; some have reverted to sysvinit and are happier.
- Argue that systemd breaks the traditional “small, composable tools” Unix ethos and is hard to extend or swap components.
Special Cases and Gotchas
- Embedded and networking-heavy setups highlight tricky race conditions and non-obvious directives (
RemainAfterExit, ordering, network targets). - Some suggest that such cases might be better handled using systemd’s own networking components rather than mixing external tools.