- Okay.
To examine the contents of an sshd service or any service,
'sudo systemctl cat' is the best way to do that.
That will show you the actual configuration.
And there we go.
We can see the unit section,
the service section, the install section,
including this beautiful 'Restart=on-failure'.
Now we need to make sure that the SSH service
will automatically be started after a reboot.
Maybe you just want to check in the current
status if that is already the case.
And I'm looking for this 'loaded enabled'.
'Enabled' means it's automatically started after the reboot.
'vendor preset: enabled'
What is that?
Well, that means that this unit by default
after installation will automatically be enabled.
So, basically you don't have to do anything to
get that done anymore.
It's an automatic procedure.
Now, in case it's not automatically started
then you can use 'sudo systemctl enable sshd'
and that'll enable it.
No action required here.
Then we need to find out the default target.
So 'sudo systemctl get-default' will do that.
So 'graphical.target' is default target.
And finally a list of all active units.
Well, that will be 'list-units'.
List units showing you all the units
that are currently loaded including their status,
which is nice for a quick overview.
As you can see a 152 in total, that's quite impressive.