LOGBOOK

HELP

Quiz Entry - updated: 2026.10.13

What does a minimal systemd service unit contain, and how is a new service brought up?

A unit file in /etc/systemd/system/ with [Unit], [Service] and [Install] sections; after systemctl daemon-reload it is started with systemctl start and checked with systemctl status.

Running an app as a service: user, executable, unit file, reload, start, status

* From service account to a running, supervised service. *

[Unit]
Description=Manage Myapp service

[Service]
ExecStart=/usr/local/bin/myapp
User=myappuser
Type=simple
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
Directive Meaning
ExecStart The program to run
User The account it runs as: the service account, not root
Type=simple The started process itself is the service
Restart=on-failure, RestartSec=10 If it crashes, restart it after 10 seconds
WantedBy=multi-user.target Start it at boot in the normal multi-user state, once it is enabled

Then:

  1. sudo systemctl daemon-reload: systemd re-reads all unit files and learns about the new one.
  2. sudo systemctl start myapp: start it now (enable would also start it at every boot).
  3. sudo systemctl status myapp: shows whether it runs, its PID and the latest log lines.

systemd is the init system (PID 1) of almost all current distributions. It starts and supervises services, so an application is not just started by hand in a terminal.

Go deeper:

From Quiz: ISLAB / Access Management on Linux | Updated: Oct 13, 2026