Service Management with systemctl
systemctl verbs, unit file Wants/Requires/After, target units, enable vs start, and daemon-reload.
Overview
systemctl is the primary interface to systemd — the init system, service manager, and system state machine on every major Linux distribution. Understanding systemctl deeply means understanding how services start, how dependencies are resolved, how to diagnose failures, and how the system boots.
Unit Types
systemd manages units — not just services. Unit types include: .service (daemons), .socket (socket activation), .target (dependency groups), .timer (cron replacement), .mount (filesystem mounts), .device (udev devices), .path (filesystem watch).
Key concepts
- start vs enable
- restart vs reload
- mask
- daemon-reload
- Wants= vs Requires=
- systemctl isolate
Interview questions
- What is the difference between systemctl restart and systemctl reload? When should you use each?
- Walk through writing a systemd unit file for a custom application with proper dependencies.
- What does systemctl mask do, and when would you use it instead of disable?
Sign up free to read the full topic
More Linux topics
Start free on Cariara · Coding problems · System design studio