1
Q

What is systemd and its purpose?

A

systemd manages system startup and service behavior.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do unit files define?

A

Configuration for specific system components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Name common systemd unit types.

A

Services; Targets; Mounts; Timers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do service units manage?

A

Background programs and daemons.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the file extension for service units?

A

.service.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the sections in a service unit file?

A

[Unit], [Service], [Install].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does Description= in [Unit] do?

A

Provides summary.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What do Requires= and Wants= in [Unit] define?

A

Dependencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What do Before= and After= in [Unit] define?

A

Startup order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does Type= in [Service] define?

A

Process behavior; simple for foreground scripts; forking for daemons.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does ExecStart= specify?

A

Start command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does ExecStop= specify?

A

Stop method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does User= specify?

A

Non-root execution account.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does WantedBy= in [Install] define?

A

Startup target; used with systemctl enable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Give common systemctl commands for services.

A

sudo systemctl start app; sudo systemctl enable app; sudo systemctl status app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do targets define?

A

System states by grouping services.

17
Q

Name common targets.

A

multi-user.target (non-graphical with networking); graphical.target (GUI mode); network-online.target (full network connectivity).

18
Q

How to view current default target?

A

systemctl get-default.

19
Q

How to set a new default target?

A

systemctl set-default graphical.target.

20
Q

What do mount units manage?

A

File system mounts using .mount files; preferred over /etc/fstab.

21
Q

What sections do mount units include?

A

[Unit], [Mount], [Install].

22
Q

List common mount directives.

A

Description; After=local-fs.target; What=source; Where=mount location; Type=file system type; Options=behavior; WantedBy=multi-user.target.

23
Q

How to enable and start a mount?

A

sudo systemctl enable mnt-usbdrive.mount; sudo systemctl start mnt-usbdrive.mount.

24
Q

What do timer units do?

A

Schedule tasks; replace or supplement cron jobs; paired with .service files.

25
Name common timer directives.
OnBootSec=delay after boot; OnCalendar=calendar syntax; Persistent=true for missed runs.
26
Give an example of a timer configuration.
backup.timer: Type=oneshot; OnCalendar=*-*-* 02:00:00; Persistent=true; enable with systemctl enable.