1
00:00:06,400 --> 00:00:11,269
When working with systemd, you will work with
targets. A target is a group of services.

2
00:00:12,269 --> 00:00:17,890
Some targets are isolatable and that means that you can
use them as a state that your system should be in.

3
00:00:18,589 --> 00:00:20,039
There's four of them
that you should know.

4
00:00:20,539 --> 00:00:27,376
These are Emergency target, Rescue Target, Multi User target,
and Graphical target, where emergency and rescue are only used

5
00:00:27,376 --> 00:00:34,213
if you need to fix something. Multi user is
the typical state that the server without GUI is starting

6
00:00:34,213 --> 00:00:41,049
in, and graphical target is what your workstation
is starting in if it uses a graphical desktop.

7
00:00:42,549 --> 00:00:47,436
In this target, different units are started
and you can use systemctl list dependencies

8
00:00:47,436 --> 00:00:52,323
on the target to see the contents
and the dependencies of the systemd targets.

9
00:00:52,323 --> 00:00:57,210
That makes it crystal clear what
exactly is started within the target.

10
00:00:58,189 --> 00:01:03,479
You can use systemctl getdefault to check
your current default target. And if ever you

11
00:01:03,479 --> 00:01:08,769
want to change you use systemctlsetdefault to
set a different target as a default.

12
00:01:09,269 --> 00:01:11,629
Let's analyze what these
dependencies are all about.

13
00:01:12,329 --> 00:01:16,674
So I'm starting with the systemctl.
What was it again? It lets you

14
00:01:16,674 --> 00:01:21,019
Tab completion. Do you see that
all these commands that are automatically displayed?

15
00:01:21,340 --> 00:01:28,275
Well, I'm going to make that get default and use
tab completion to automatic automatically completed. So my default is

16
00:01:28,275 --> 00:01:35,210
the graphical target. So if I want to know what's
going on in my target, I'm using systemctl list dependencies.

17
00:01:38,609 --> 00:01:44,060
And there I can show in my default target,
that's a graphical target. I can see everything that is

18
00:01:44,060 --> 00:01:49,510
started nicely indicated with these green dots or white
dots, where green means it is currently running, white means

19
00:01:49,509 --> 00:01:54,959
it's not currently running, and if you would see
red, then that means that something has gone wrong.

20
00:01:55,680 --> 00:02:00,239
Here you can see what exactly is happening
to get your system into a certain state.
