What is systemd and its purpose?
systemd manages system startup and service behavior.
What do unit files define?
Configuration for specific system components.
Name common systemd unit types.
Services; Targets; Mounts; Timers.
What do service units manage?
Background programs and daemons.
What is the file extension for service units?
.service.
What are the sections in a service unit file?
[Unit], [Service], [Install].
What does Description= in [Unit] do?
Provides summary.
What do Requires= and Wants= in [Unit] define?
Dependencies.
What do Before= and After= in [Unit] define?
Startup order.
What does Type= in [Service] define?
Process behavior; simple for foreground scripts; forking for daemons.
What does ExecStart= specify?
Start command.
What does ExecStop= specify?
Stop method.
What does User= specify?
Non-root execution account.
What does WantedBy= in [Install] define?
Startup target; used with systemctl enable.
Give common systemctl commands for services.
sudo systemctl start app; sudo systemctl enable app; sudo systemctl status app.
What do targets define?
System states by grouping services.
Name common targets.
multi-user.target (non-graphical with networking); graphical.target (GUI mode); network-online.target (full network connectivity).
How to view current default target?
systemctl get-default.
How to set a new default target?
systemctl set-default graphical.target.
What do mount units manage?
File system mounts using .mount files; preferred over /etc/fstab.
What sections do mount units include?
[Unit], [Mount], [Install].
List common mount directives.
Description; After=local-fs.target; What=source; Where=mount location; Type=file system type; Options=behavior; WantedBy=multi-user.target.
How to enable and start a mount?
sudo systemctl enable mnt-usbdrive.mount; sudo systemctl start mnt-usbdrive.mount.
What do timer units do?
Schedule tasks; replace or supplement cron jobs; paired with .service files.