Linux · Systems fluency
What is systemd and how does it work?
Short answer
systemd is the init system and service manager on most Linux distributions. It runs as PID 1, starts units in dependency order, and provides service supervision, logging, timers, sockets, and cgroup integration.
systemd models everything as a unit with a declarative configuration file. It builds a dependency graph, starts independent units in parallel, and tracks each service through cgroups so it can clean up the whole process tree.
systemctl status ssh
systemctl list-units --type=service --state=running
systemctl list-dependencies multi-user.targetUnit types and targets
- .service units run daemons or one-shot commands
- .socket units provide socket activation
- .timer units replace many cron use cases
- .mount and .automount units manage filesystems
- Targets group units into boot stages such as multi-user.target
systemd captures stdout and stderr from services into the journal, applies resource limits and sandboxing directives, and restarts failed services according to the unit policy. That replaces a large amount of custom supervisor scripting.
Follow-ups you should expect
Interviewers use these to check whether the first answer was understanding or memorisation.
- 1What is the difference between a target and a runlevel?
- 2How does systemd order service startup?
- 3What does socket activation solve?
- 4Why does systemd use cgroups for services?
Say it in the interview
systemd is the init system and service manager on most distributions. It runs as PID 1, builds a dependency graph of units, and starts them in parallel where possible. Services are tracked in cgroups, so systemd can clean up the whole process tree. It also provides journal logging, timers, socket activation, and sandboxing.
Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.
Related questions
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Linux mock interview and get scored feedback on depth, clarity and confidence.