Recall & Review
beginner
What is a systemd service file used for in Raspberry Pi?
A systemd service file tells the Raspberry Pi how to start, stop, and manage a program automatically when the system boots or shuts down.
Click to reveal answer
beginner
Which directory usually holds systemd service files for user services?
User systemd service files are usually stored in
~/.config/systemd/user/.Click to reveal answer
intermediate
What is the purpose of the
[Service] section in a systemd service file?The
[Service] section defines how the program runs, including the command to start it (ExecStart) and how it behaves.Click to reveal answer
beginner
How do you enable a systemd service to start automatically on boot?
You run
sudo systemctl enable service_name.service to make the service start automatically when the Raspberry Pi boots.Click to reveal answer
beginner
What command shows the status and logs of a systemd service?
Use
sudo systemctl status service_name.service to see if the service is running and check recent logs.Click to reveal answer
Where do you place a systemd service file to make it available system-wide?
✗ Incorrect
System-wide systemd service files go in
/etc/systemd/system/.Which command starts a systemd service immediately without rebooting?
✗ Incorrect
start runs the service now; enable sets it to run on boot.What does the
ExecStart line in a systemd service file specify?✗ Incorrect
ExecStart tells systemd what command to run to start the service.How do you reload systemd to recognize a new or changed service file?
✗ Incorrect
After changing service files,
daemon-reload tells systemd to re-read them.Which section in a systemd service file describes when the service should start?
✗ Incorrect
The
[Unit] section defines metadata and dependencies, including when to start.Explain how to create and enable a systemd service to auto-start a Python script on Raspberry Pi boot.
Think about the steps from writing the file to making it run automatically.
You got /6 concepts.
Describe the role of the [Install] section in a systemd service file.
It connects the service to system startup targets.
You got /3 concepts.