Let's have a look at the solution.
So sudo systemctl status SSHD works also without sudo by the way, is showing
us what? Well, it's showing that the SSHD is active and it is running.
And here is its pid and it's not using so many so much memory.
And the next part ensure that SSHD service will be automatically started.
We don't have to do that because it is already enabled.
But if that wouldn't be the case, then you could use sudo systemctl enable SSHD Next
we need to find out what is used as the default target. Well, that would be
systemctl getdefault and there we can see that we have multi user target as the default.
Aha, multi user target as a default. That means
that I forgot to set my default target. Let's
use sudo systemctl setdefaultgraphical target to set it back.
Now we can safely ignore the note that you see at the end. That's only showing us that we have started with something else.
Last part of this lab is to show a list of all active unit vals.
That would be systemctl list units.
There is list units and list unit vals if you want to see what is currently running.
List units is the better solution because that is showing everything that is loaded and active.
And listunit files is showing more information.
It also includes units that are not currently active.
But if you want to see what is running, list units is the better solution.