The version of Linux that we use
manage the system by using the system D utility.
Now in particular,
it's going to use the system control command,
and that's going to allow us
to start, stop, restart, view all the different services
that are running on the system.
Now, older systems use SysVinit.
That's been largely replaced by system D.
So we're going to go through the process and just go
over a few commands, few processes, how to manage them,
what type of configuration files that are required
for these services to start,
from initial boots and how to switch in,
and out different configuration settings.
So let's go get started here.
First thing we want to do,
we want to use the process command.
Now, we want to see everything that's running.
So we're going to use process dash E.
You can go pipe it in the search for the init command.
Now, we're looking for the init command only by itself,
'cause that will indicate
that we're using the system Vinit,
and that's the older version.
But what we're going to do is look for the system MD now.
And that should be number one.
Okay?
So since that's process number one,
we realize that, that's the service
that's going to start all other services.
And again, that initializes our services.
Start, stops and pulls different resources
in order to fulfill the requirements
of the services beneath them.
Okay?
Now, let's go ahead and check the configuration files.
Now, and specifically we're going to view the target files
that specify the services that will start
when the system starts.
Okay?
So first thing we want to look at is the multi-user target.
And now this one's mostly going to focus
on the command line only interface for the system.
So let's look that up real quick.
Now, if you look, this is a file that gives us
general information about this target.
What we're going to key in on is the unit section,
the description but we're going to focus
on the requires field.
And you see it requires the basic.target process
to be running before it can start.
Now, the basic.target process starts a lot
of different services that are required,
and it pulls together those different resources
that gets the system established and up and running.
Okay, let's just use the same thing,
but now let's look at the graphical user interface one.
Okay, and we'll focus on the requires,
and we say we use them,
we need the multi-user target first,
up and running before we can process the graphical target.
And you see the wants display,
again, that's saying, "In order for this process to run,
we're going to require the display manager."
And again, this is a graphical user interface target.
So that means we're going to have to initialize all
of the devices and resources that are required
to get the display up and running.
This shows how these processes build upon one another.
One requires another,
so that's why the system D starts first,
and it bootstraps everything else.
So now we're going to use the system control,
which is used to manage the system D utility.
And we're going to get a view of all the services
that are currently running in the system.
Type, it's going to equal service.
Okay, now this a list of every service
that's currently running in the Linux system.
Okay, now, if you look at the bottom,
just indicates what those fields mean.
So the low reflects
whether the unit definition's proper loaded,
active SUB, just further clarifying the status
of each one of those services in this particular view.
Now, we're going to go ahead and switch
to the multi-user target really quick,
and then we're going to switch to the graphical target,
'cause remember,
in order to even get to the graphical target,
we have to go to the multi-user target first.
Okay, so let's switch to the multi-user target,
and see how the environment looks.
System control
isolate.
All right, and again, this looks very familiar,
but initially we defaulted into a graphical user interface,
and then switched to a terminal.
With this particular type of target,
we go straight into command line and that is it.
So let me log in.
All right.
Again, now, this is going to be a light version of the system,
pretty much where we're not using it
in the graphical user interface.
So the system should run more efficiently,
since all these services aren't being needed.
Okay, now, let's switch to the system control isolate,
and we're going to use the go back to the graphical target.
Okay.
And we see we're back to a more familiar setting.
Okay?
I'm going to here.
Next, we're going to go ahead and go just change
the default to this target,
even though it's already set this way.
Just going to demonstrate how to do that.
Okay, let's do sudo, system control.
Okay, now let's end this.
Whenever we first log into the system,
we're going to go into this target that we're currently in.
Just want to check out some
of the system control sub commands.
And again, we can use that double tab,
and it's gon' let us know everything we can do,
all these sub commands that are available
when you're using the system D,
or AKA system control command.
So in particular, we're going to note the start,
stop and restart sub commands,
'cause we're going to use those very frequently
as Vinit system administrators.
So let's go ahead and practice on a particular service.
And one thing that we're going to look
at is the SSH Daemon service.
Okay, so we're going to do sudo.
The status of
the SSH Daemon service.
All right.
So we'll see that's up and running for us.
This is a quick way again,
to get the status of a service,
and we can use any service in the scenario.
So we can go through and actually stop this service.
And we're going to bring that status up again,
see what that looks like.
Okay, now, we see the active status
just went to inactive or dead.
Okay, I'll re-enable that.
Check the status, back to green.
Easy enough.
Again, I'm going to try one last one.
It's going to be the firewall for low practice.
Okay, we see it's actually inactive.
So we'll go ahead and start the service up.
Okay.
See it's up and running.
So we're going to explore the enable and disable command.
And those reference the status of this service
when the system reboots.
If we look at again, really quick,
we see it's active.
Now, we're going to change this.
We're going to disable this service.
And so when it first starts up, it should be disabled.
So it's going to reboot.
Okay, let's check out the system control status.
Okay, so we see it's now no longer running.
But again, that's a key service that we need,
so let's make sure we enable this,
as well as starting this service.
Okay.
Looks like we're all good to go there.
Well, that sums this lesson up.
We went through how to use the system control,
which is a utility of system D
to monitor start, stop and change statuses
of different processes and services
that are running on a Linux system.
And I'll see you in the next lesson.