What you will learn
- Start, stop, and enable services
- Read unit files
- Inspect logs with journalctl
New to this? Start here
The basics, in plain English
Some programs need to run quietly in the background all the time, like a web server. These are called services. On modern Linux, a manager named systemd starts them, keeps them alive, and restarts them if they crash.
- Service (daemon)
- A program that runs in the background continuously, with no window, waiting to do work.
- systemd
- The built-in manager that starts services when the machine boots and watches over them.
- systemctl
- The command you type to talk to systemd: start, stop, or check a service.
- Unit file
- A small settings file that tells systemd how to run one service.
- Enable on boot
- Telling the system to start a service automatically every time the computer turns on.
- journalctl
- A command to read the logs (the recorded messages) a service has printed.
01
Units everywhere
systemd manages services as units. systemctl is your control surface for starting, stopping, enabling on boot, and checking status.
02
Logs
journalctl reads the structured journal. Filter by unit with -u and follow with -f, exactly like tail.
Try it yourself
bash
$systemctl status nginx↳Check if the nginx service is running and see recent logs.$systemctl enable --now app.service↳Start the service now and set it to launch on every boot.$journalctl -u app -f↳Follow this service’s logs live.$systemctl daemon-reload↳Reload systemd after you edit a unit file.↳ lines explain what each command does — only the commands get copied
Finished this topic?
Mark it done to earn 100 XP and keep your streak alive.