systemd Flashcards

1
Q

which dictates how a systemd-based Linux computer will boot up. An innovation of systemd is that it removed the need to have shell scripts The problem with Bash scripts is that they have to be ran
through the Bash interpreter, and these end up spawning new processes for each command within the shell script. Each one of these processes then have to open up a library file for the functions that a command will need. All in all, this is an inefficient use of time to get services started, which in turn slows down the speed with which the system could boot or a service to start.

A

systemd unit files

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

To get around this problem the developers of systemd replaced many of the shell scripts
with equivalent functionality written in C code, which is then compiled to run much faster.
Not all shell scripts could be replaced, but each one that is replaced by C code is a win for speed and efficiency. This does not mean that you cannot use the older System V init scripts anymore.
Systemd still has a compatibility mechanism to read these older script files and still use them.
The caveat is that the older System V init scripts will not enjoy the same robustness that they would get from a patch daemon that works directly with systemd, such as socket activation, parallel startup,
and other features. Nonetheless, the point remains that even though systemd is different, it is still backwards compatible.

A

bash script problem

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

what are known as unit files default location where unit files are installed by packages.

A

instead of bash files systemd utilizes

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

location of first unit file and it should never be edited

A

/usr/lib/systemd/system

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

this unit file is safe to edit any unit files in this location will take precedence
over any other unit files on the system.

A

/etc/systemd/system

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

The other location of systemd unit files is the runtime location

A

/run/systemd/system

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

can view all of the unit files on your computer by running systemctl and the output of this command is divided up into different sections,each one pertaining to a particular type of unit

A

list-unit-files

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

unit that syncs up other units when the computer boots or changes state

A

target

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

multi-user system, similar to what runlevel 3 provided

A

multi-user.target

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

multi-user system with a desktop environment, similar to what runlevel 5 provided

A

graphical.target

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

pulls in a basic system and file system mounts and provides a rescue shell

A

rescue.target

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

basic system, used during the boot process before another target takes over

A

basic.target

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

system initialization

A

sysint.target

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

defines the target unit configuration

A

man 5 systemd.target

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

listing of all target units and definitions

A

man 7 systemd.special

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

Show all unit files for available targets

A

Target Unit: systemctl list-unit-files -t target

17
Q

Show all loaded and active unit files

A

Target Unit:systemctl list-units -t target

18
Q

Target Unit: systemctl get-default

A

List out the default target

19
Q

Change the default target to a different target

A

Target Unit:systemctl set-default

20
Q

Will change the running state of the system from the current target to a different target

A

Changing Target:systemctl isolate <target></target>

21
Q

Almost identical to the System V

A

Changing Target:systemctlrescue

22
Q

allows the root user to repair a system

A

Changing Target: Init single-user mode

23
Q

Will run the reboot.target. Same thing as just typing ‘reboot’ at the prompt

A

Changing Target:systemctlreboot

24
Q

Will perform a complete shutdown of the system by isolating the system to the poweroff.target. Same thing as just typing ‘poweroff’ at the prompt

A

Changing Target:systemctl poweroff