Chapter 10 of 17
Operate services and read logs
Understand running state, startup policy, logs, and the boot sequence.
The mental model.
A typical boot progresses through firmware, a bootloader, the kernel and initramfs, then userspace initialization. On many distributions systemd is PID 1 and coordinates units and dependencies. Other init systems exist.
systemctl start activates a service now; enable configures startup dependencies for later boots. A service can be enabled but stopped, or running but disabled. status and is-enabled answer different questions.
journalctl -u service selects unit logs; -b selects the current boot. Read timestamps and the earliest relevant failure rather than only the last line. Check configuration syntax before restarting a service.
After editing a unit file, systemctl daemon-reload makes systemd reread unit definitions. It does not restart the service. Apply the appropriate reload or restart and verify both unit state and application response.
Read it. Predict it. Try it.
Before running these commands, predict what each line will change or print. Launch a quest below to open the simulated terminal.
systemctl status nginx
sudo systemctl start nginx
sudo systemctl enable nginx
journalctl -u nginxInspect, start, configure boot behavior, and inspect evidence. These are separate operations with different effects.
Check your understanding
Explain the why.
Put it into practice.
Complete the exercises, then try the Boss Challenge without hints. Each quest checks its own objectives. You can revisit this chapter at any time.
Make the learning stick.
Close the explanation and describe the main idea in your own words. Change a filename or input and predict the outcome. Tomorrow, repeat a quest without hints. Then apply it in a disposable real Linux environment.
Open the real-system labs →