15. Services, Packages, and systemd#
This chapter introduces service administration: package awareness, systemctl, journalctl, units, service logs, and daemon troubleshooting.
Packages: Know how software is installed and updated.
Services: Manage long-running system tasks.
systemd: Inspect units and service state.
journals: Read service logs with
journalctl.Persistence: Recognize legitimate and suspicious service startup paths.
Startup files: Distinguish shell initialization from service startup.
Chapter Video
Linux Crash Course - systemd: Using the systemctl command (26:31) by Learn Linux TV
Hosted on YouTube; property of its original creator, embedded here for educational reference only.
Learning Objectives
By the end of this chapter, you will be able to:
Inspect installed packages and service state.
Use
systemctlto view, start, stop, and restart services in a lab.Read service logs with
journalctl.Recognize basic unit-file structure.
Inspect shell startup files, aliases, and environment setup safely.
Explain how services can be legitimate automation or persistence mechanisms.
Chapter Flow
Glossary
# |
Term |
Explanation |
|---|---|---|
1 |
package |
Installed software bundle. |
2 |
service |
Long-running managed process. |
3 |
daemon |
Background service process. |
4 |
systemd |
Linux service manager. |
5 |
unit |
systemd configuration object. |
6 |
systemctl |
Tool for managing systemd units. |
7 |
journalctl |
Tool for reading the systemd journal. |
8 |
service log |
Events emitted by a service. |
9 |
restart |
Stop and start a service again. |
10 |
persistence |
Mechanism that starts code automatically. |
11 |
startup file |
File read by Bash when certain kinds of shells begin. |
12 |
|
Startup file commonly read by interactive non-login Bash shells. |
13 |
alias |
Interactive shortcut that expands to another command line. |
14 |
interactive shell |
Shell connected to a user terminal. |
15 |
non-interactive shell |
Shell running a script or command without direct prompting. |