So between units in system D, there is often dependencies.
And you can use system CTL list dependencies
for a complete overview of all currently loaded units
and their dependencies.
You can also do that for a specific unit.
And you can manage dependencies as well.
And this is what I would like to show you.
So first, let me start with system CTL list dependencies.
And there we can see that I'm in default target.
Default target is a graphical target.
It's my standard state that I'm in.
I'll tell you more about default target and multi-user target
later in the lesson about the Linux boot procedure.
And then we can see indicated with green dots
all the units that are a part of my default target.
And that includes the multi-user target and everything else.
Now, there's another fun thing that I want
to show you about dependencies.
So let me use system CTL edit httpd.service again.
And there I'm going to add a line.
And this time, it's in the unit description.
And in unit, I make requires is vsftpd.service.
So now I need to verify the current state of HTTPD.
It's running.
I don't want it to be running.
So let me stop HTTPD.
Let me also use system CTL status on vsftpd.
And there we can see it's inactive and dead.
And that is good.
It's not currently running.
And now I'm going to use system CTL start HTTPD.
And now let's have a look at system CTL status vsftpd.
And what do we see?
We see that system D has started vsftpd.
Why is that?
Well, that is because I entered requires is vsftpd.service
in the HTTPD configuration file.
This might not be the best way to deal with dependencies,
but it's cool that you can define dependencies
within a specific unit.
So if one unit really needs another unit
to be completely doing its work, this is how you can do it.