Systemd (week 10) Flashcards

1
Q

What is systemd?

A

Systemd is a system and service manager for linux (most common type)

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

what does systemd does on boot?

A

It starts as PID 1 and manages the services in userspace

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

What is a service(daemon)?

A

A service is a process that runs in the background without user input. Waits for events to occur and triggers something in response

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

What is a target?

A

group of services that are connected through dependencies and activate the required services to reach some sort of system state

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

What is the command to view current targets?

A

sudo systemctl list-units –type=target

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

How do you manage and control systemd?

A

systemctl

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

How do you get systemd to search for new or updated units?

A

systemctl daemon-reload

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

What’s the difference between masking a unit and disabling it?

A

Disable keeps the service from running on startup while masking will prevent the unit from starting at all

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

What’s the directory for custom service files?

A

/etc/systemd/system

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

What is the syntax of a servicefile?

A

[section]
directive=value

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

What directive runs a script in a unitfile?

A

ExecStart=dirpath

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

What are the common sections in a unit file?

A

[unit], [install], and a third depending on type ie [timer] for .timer or [service] for .service

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

What are the dependency directives?

A

requires(needs) and wants(option), can specify ‘after’ if run after a certain service

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

What is the advantage of using a package manager?

A

Installs packages with dependencies

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

How do you search for a package in archlinux

A

pacman -Ss

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

How do you delete a package?

A

pacman -Rns

17
Q

What are software repositories?

A

Software repositories are where packages are kept for installation

18
Q

How do you check which package repositories are enabled

A

/etc/pacman.conf

19
Q

How to view all running timers?

A

systemctl list-timers

20
Q

What are the two types of timers in systemd?

A

monotonic and Realtime

21
Q

What is a monotonic timer?

A

Monotonic timer activates relative to a system event
ie OnBootSec

22
Q

What is a Realtime timer?

A

A timer that activates based on a clock
ie OnCalender

23
Q

How do you test if a realtime Oncalendar is working properly?

A

systemd-analyze calendar <calendar-format></calendar-format>

ie sudo systemd-analyze calendar --*

24
Q

How do you change the timezone of your linux distro?

A

sudo timedatectl set-timezone <location></location>

25
Q

What is the format of the OnCalendar directive?

A

DayOfWeek Year-Month-Day Hour:Minute:Second

ie Sat --* 05:00:00

26
Q

What are the two main types of services?

A

simple (runs continuously) and oneshot (one and done)

27
Q

Where is the mirrorlist for pacman?

A

/etc/pacman/pacman.d/mirrorlist

28
Q

What repository does arch linux use?

A

Arch User Repository (AUR)

29
Q
A