systemd in Plain Words
systemd is the program that starts and manages everything else on a Linux server. The kernel runs it first, as process number 1, and from then on it starts services in the right order, restarts them when they fail, and stops them cleanly at shutdown.
ps -p 1 -o comm=On Ubuntu, Debian, AlmaLinux, and Rocky Linux this prints systemd, so the same tools work on all four.
Units: What systemd Manages
Everything systemd manages is a unit, described by a small text file. The suffix of the name tells the type:
| Type | Example | Manages |
|---|---|---|
| service | nginx. | A daemon |
| socket | ssh. | A listening socket |
| timer | logrotate. | A schedule |
| mount | tmp. | A mounted file system |
| target | multi- | A group of units |
Packages install their unit files under /usr/lib/systemd/system; your own files and overrides go in /etc/systemd/system, which takes priority. How to write one is shown in systemd unit files, and what a service runs is explained in what is a daemon.
Targets Instead of Runlevels
Older init systems booted into numbered runlevels. systemd uses targets, which are named groups of units:
| Target | Old runlevel | Meaning |
|---|---|---|
multi- | 2, 3, 4 | Normal server, no desktop |
graphical. | 5 | With a desktop |
rescue. | 1 | Single user, for repairs |
reboot. | 6 | Restart |
A server normally boots into multi-user.target; systemctl get-default shows which target yours uses.
systemctl in Six Commands
| Command | What it does |
|---|---|
systemctl status nginx | State, process ID, last log lines |
systemctl start nginx | Starts it now; stop stops it |
systemctl restart nginx | Stops and starts it |
systemctl reload nginx | Rereads the configuration without a stop |
systemctl enable --now nginx | Starts it now and at every boot |
systemctl --failed | Lists units that failed |
Commands that change something need sudo. After you edit a unit file, run sudo systemctl daemon-reload so systemd reads the new version. Filters for long lists are in how to list services with systemctl.
The Journal
systemd collects the output of every service, plus kernel and boot messages, in one log called the journal, kept by systemd-journald. Read it with journalctl:
sudo journalctl -u ssh -n 50
sudo journalctl -b -p errThe first shows the last 50 lines from the SSH service (sshd on AlmaLinux and Rocky Linux), the second every error since the last boot. Details are in journalctl.
Timers
A timer unit starts a service on a schedule, like a cron job. systemctl list-timers shows every timer with its last and next run. The two approaches are compared in what is cron.
What systemd Replaced
Before systemd, most distributions used SysV init, with shell scripts in /etc/init.d, and Ubuntu used Upstart. Where the service command is installed, the old form service nginx restart still works and passes the request on to systemctl. systemd also brought small tools for settings that used to mean editing files: hostnamectl (see how to change the hostname in Ubuntu), timedatectl, and systemd-analyze.
When a Service Does Not Start
- Run
systemctl statuswith the service name and read the last log lines. - Check the configuration with the program's own test, such as
sudo nginx -t. - Read more of the log with
journalctl -uand the service name. - After a reboot, run
systemctl --failed;systemd-analyze blameshows which units slowed the boot.
A safe restart routine is in how to reboot a Linux server.
Updated:
Linux VPS with Full Root Access
MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.
More Guides
No Limits on Service or Support
You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

- 100% customer satisfaction goal
- Our own hardware
- 24/7 ticket and email support
- 4 countries with locations