All right, So the last bit of module one no one is
changing run levels do targets, shutting down and rebooting.
So now the concept of the run level the boot target
is interesting because it allows us to define
what mode the system should be in when it
shuts up. After we shut down and reboot,
What level do we want to come up? Do we want to be in a multi user mode you want enable networking? We wanna be in single user mood.
These are some of the options that are available to us,
and we'll see why that's important here in just a little bit.
We also want to be able to let people know if we're gonna
shut the system down to make changes, to reboot and so on. How do we let everybody know that that's happening so that they can save their work and log off?
So we saw a few of these things earlier at Cnet Tab. We know doesn't exist or does. It's not Supported and modern Systems based on System D.
Also the etc net dot D, Director of the unit program we saw was linked to System D,
but There's also some comedians, like System C T L that we saw in the previous module previous section of this module.
And then we'll look at what the talented command does, what the unit command does.
we'll wrap up with talking about Wall, which will see here in just a little bit.
So as we talked about the last module and it is the first program,
this is what is the process idea of zero. And all other processes are spawned from that parent process of Annette.
So System five
systems will read from at cnet dot d. So earlier versions of Sent DOS or even Red Hat Enterprise Lennox and so on will use that method.
Upstart is supported by a bun, too, and Fedora
and then System D with newer versions of Red hat,
newer versions off the door and sent off.
Now I can run
generally with the UNIX or Lennox system. There's more than one way to accomplish a task.
There's not just one way to say I want to change my run level. I can do it a few different ways. I can run the unit command I can also on the Telenet Command
and I can run commands to show me details about my current run level if I want to make changes to that in any way.
So all three of these command system control and it or telling it can be used to move between these different run levels that we see here.
Level zero is halting the system. It's it's powered off. So if I told using a system c t L in it or telling if I want to go to run level zero, that basically means turn the system off completely.
I can go to single user mode,
which is my rescue target.
Single user mode is useful because I can,
uh, force the system into this
into this mode so that no one else could log in networking service. Is there not even started?
This way I can get a bunch of things done like follow system maintenance, colonel maintenance, troubleshooting, booting problems, perhaps all different things
and be able to do my work in a in a way that's
isolated. And that way I can't be disturbed until I'm finished with my work and then I can go back into a multi user mode like run double, too.
A little, too, is multi user without networking,
which is not all that useful in many cases, but it's still useful for certain purposes.
Generally, I'm gonna be in multi user mode with networking enabled
because that allows the multiple users to get to the system over the network instead of being directly connected.
Then we have reliable five
run over fours configurable, as it says, so you can define this for different things.
Not really important for this discussion, right? The moment
run little five is
what we associate with a Windows,
our window manager type of environment. It's my graphical target
allows me to use the system
and a, uh
in a graphic mode, which is certainly what we generally want.
So if I run the unit command,
I can run and it's six,
and that's a reboot.
very quickly it's taking my system,
shutting it down, and it's gonna start back up.
Now this is the grub menu that talked about liberal. We'll see more details about this later, but that five second timer, that's what allows me thio
have a chance to change my colonel settings. I can pick from between the colonel's that are here about two different ones to choose from and also a rescue Colonel.
But we'll look more of that later,
right? Nam is gonna let it boot from the default setting.
And during the boot process, we see a bunch of messages. Not too many there, because, um,
off the way I stopped it.
But generally I can see what the system is doing. What? It's running as it's coming up. What is loading.
And I'm gonna go ahead and long back in.
It takes a moment.
All right, So I just did a unit six which rebooted the system. I could have done it with telling at six. I could have also run Shut down, Dash are
even the reboot command
now re boot with power off reboot with a force option,
There's sometimes reasons why you want to do this.
Uh, we boot with power. Off is
kind of nun nonsensical in a way, right? Why would I want a reboot?
But then power off.
You could run the power off, commander, accomplish the same thing. I can just
sage, you know, shut the system down and stay down. Turn herself off.
Very similar to what the whole command does or omit zero or telling it zero.
You might be thinking, Why are there so many options? It's because some of these methods are older legacy methods, and they're still supported.
The shut down command is nice, though, because it gives us the ability to
send a message or configure a time delay.
So I'll make that full screen again.
Yeah, I'm gonna use my SUV command to become route.
Talk about that later.
But if I look at that shut down,
I can see that I can run it with Dash H or Dash Dash Holt.
You'll notice that I ran the dash dash help! This gives me a different output than if I ran a man. Command
man is much more detailed and gives you a lot more
info. Usually some examples as well.
Not really too many in this case, but
shut down, Dash, our will reboot the machine.
I could also, uh,
use Dash. Katie just sent a warning, but I actually do the shutdown
and I can configure a time delay.
So if I run shutdown dash are
it gives me a nice message saying shutdown scheduled.
I could run Shut down Dash C to cancel this.
Now it's cancelled.
Now, if I run shut down by default, it should give me
for that everybody sees once they get the message.
So this broadcast message that we see here,
this goes to everybody that's logged in through terminal, we'll see a message, and they probably get a terminal beep as well. It's intended to get their attention so they can say, Oh, jeez, the system's gonna be shutting down.
I had better save my work
get ready for for
logging back in later.
So that that alerting function is pretty useful because
often a shutdown is something that we want to do in a timely fashion. So all I have to do is use a plus sign and a number in minutes, and I can configure this.
So if I run this command
so shut down Dash are to reboot or dash age to halt whatever it is.
So now it says
system's going down for reboot at 2051
which is five minutes from now, because it's 2046
and again as before, I can run a shop time dashi to cancel that.
So pretty handy.
All right. And then the last thing to remember for this modules that these were the commands we looked at. These are all pretty easy to use. Very
simple, to become familiar with. And I as before, I recommend that you spend some time with that
and do some practice.
All right, that gets us to the end of the first module. Our next module is installation of Lennox and package management. See you then. Thank you.