A deep section in How Computers Actually Work. This page follows a real Linux command from the shell into systemd, then toward process creation and service management.
systemctl is a command-line client. It does not directly start or stop services. Instead, it sends requests to systemd, the system manager.
systemctl start nginx, you are not personally
starting nginx. You are asking systemd to start it according to its unit file,
dependencies, and service rules.
The visible command is short. The hidden activity is layered. The system moves from user request, to client process, to system manager, to unit logic, to process creation.
A useful way to think about systemctl is as a remote control.
It talks to systemd, asks for information, or requests an action.
systemctl status nginx asks systemd for service state.systemctl start nginx asks systemd to start a service.systemctl stop nginx asks systemd to stop a service.systemctl enable nginx asks systemd to configure startup behavior.In each case, systemctl is not the long-running manager. It is the short-lived command that makes a request and exits.
systemd runs as PID 1, the first user-space process started by the Linux kernel. Because of that role, it becomes responsible for starting, supervising, and organizing much of the rest of the system.
systemd uses unit files to describe what a service is and how it should behave. A service unit may define what program to run, what must start first, and what should happen if the service fails.
[Unit]
Description=Example Web Service
After=network.target
[Service]
ExecStart=/usr/sbin/nginx
Restart=on-failure
[Install]
WantedBy=multi-user.target
The important line here is ExecStart.
That is the program systemd eventually launches when the service starts.
When systemd receives a start request, it does not simply run a binary immediately. It evaluates the unit and its context.
ExecStart?After that, systemd uses normal Linux process creation mechanisms to launch the service.
At the bottom of the systemd action is ordinary Linux execution:
That is the moment a service stops being a file on disk and becomes a live running process.
systemctl status sshd
or:
systemctl status nginx
systemctl list-units --type=service --state=running
systemctl cat sshd
or:
systemctl cat nginx
pgrep -a sshd
or:
pgrep -a nginx
systemctl gives you a human-friendly way to interact with systemd. systemd gives Linux a coordinated way to manage services. The kernel provides the process machinery underneath.
This connects several layers at once:
systemctl start nginx is a doorway into the
hidden life of Linux: requests, policies, dependencies, processes, and execution.
The natural next deep section is: fork() and exec(). That page follows the exact point where systemd turns a request into a running program.
Follow a systemctl request from the command line through systemd and into a running service.