So let's talk about system D units.
As we just discussed, service units
are used to start processes.
And stockage units monitor activity on a port
and start a corresponding service unit when needed.
Timer units are used to start services periodically.
And path units can start service units
and activity is detected in the file system.
Mount units are used to mount file systems.
And other unit types, as we have just seen,
are available as well, but they are not
as important for RHCSA.
The most important for RHCSA are the service units.
They are often used to start daemon processes.
These are processes that should be running all the time.
The fun thing about system D is that you can run anything
as a system D unit.
Just define your unit file and specify type
is simple to start any command through system D.
Let me show you how you can investigate what's
going on with these units.
So I'd like to show you systemctl cat on ssh.service.
Systemctl cat is how you can check the current configuration
for a unit.
And I know what am I doing.
Well, I'm forgetting to use tab completion.
If I would have used ssh tab completion,
I can see all the different options,
including the fact that there is sshd.service.
So this is the compact definition
of what is going on in a system D unit.
Here, you can see the name of the file that is behind it.
It's a usual lib system D system.
Usual lib system D system is for files
that are provided through the packages.
You should not modify them.
We have a unit description.
In the unit description, you have
generic stuff that is required for starting
the unit the right way.
And then we have the service description.
And the service description is what
you use to define what should be started.
And what is nice about system D is that it is so simple.
All that it's about is xxstart.
What do we need to start?
Well, user sbin sshd with a couple of options.
And in case you want to know what are these options,
well, that is what the environment file is
for, specified right here.
And system D is even specifying that when it fills,
it will be restarted automatically.
So the system CTL cat is what you can do for any unit.
And for an impression of the units,
well, we have seen that you can use system CTL list units.
You can also use system CTL list unit files.
That's showing all the unit files
that are available on your system,
including their specific state.
Nice thing about it is that it's also
showing unit files that have been installed,
but which have not been activated.
And that can be useful.