Next lesson we have is about System Maintenance Command's maintenance commands are those that are used
by system administrator to reboot the system, shut it down or bring in a single mode or whatever the
task they have to perform while other other users are logged in or had them log off and then bring it
to the security mode.
The commands that are used to bring down a Linux system is shut down in it now, and it has a different
level of bringing the system down or rebooting.
It goes anywhere from zero to seven zero four simply shut down and six is to reboot and three is to
bring it in and multiuser mode.
And there are many other options.
Then we have a reboot command at its reads reboot is simply to reboot your Linux machine and then we
have Hald command halt shuts down the computer.
And if there are any processes that are running that needs some time to bring down the process, halt
doesn't care.
It just shuts down right away.
It is as if you are pressing the button on your physical system, the power button and holding it and
powering it down.
It's just like that.
So now let's get into our Linux lab server and we will try out a few of these commands.
I would log into the Linux machine by logging into the PUDI, I'll open it up, log in myself.
And of course, we are, you are so.
We are in and which host are we on?
Because every time you are ready to reboot a machine, this is definitely a command you need to run,
which is hostname to make sure which computer you are on, our vigilance machine you are on.
So anyway, let's clear the screen and the first command is shut down.
Of course, I don't want to shut down this machine right now because we are going through the training.
So just quickly go through the man page of Shut Down and you will see it tells you shut down halls,
power off reboot.
The machine shut down has different options.
If you want to use these different option with it.
And those options are listed as you go down.
If you type shut down minus uppercase H, it will do exactly the same as if you would just type halt
and people power off after reboot H for equivalent to power off unless cultism specified.
So you could review every single options that is available which shut down.
Then we have the next one is in it.
And it is a system deep service.
There are different options associated with it.
Sorry, with gets in it and those options, you could view them one by one as is as I said, there are
options, zero to seven.
You could view those options and see what exactly they do.
Then we have reboot, reboot, simply reboot your computer, shut it down and power it off and bring
it back online.
And the last one you have Hault.
Power off, reboot hall power, also pretty much all these commands, you can use any one of these commands
except the reboot command and IT command.
So let's say now we wanted to reboot our machine in order to reboot your machine.
You have to be root, so become root.
And if I do reboot.
Ed, and you will see I have lost my PUDI session, and if you are logged into your console, you'll
see the system messages coming up, the system is going down, so we'll give it some time.
I will fast forward from here.
OK, so now I got the problem that the system has been rebooted, I believe, back in.
Are you putting terminal will continue to try to connect to your system if it's shut down, it tries
to connect it every second or every five seconds, depending on the setting that you have specified
and you're putting options.
So anyway, this is sweet and simple and straightforward lesson that we learned about four commands.
Try them out and get familiar with it.