Hey guys and welcome back. So in this nugget right here, what we're going to be talking
about is the startup configurations for our system. And what we are really going to be
focusing on is something called Sys-V in NIT. Now here is the deal. When you start on your
computer, certain services are going to have to be started. Maybe you want to have particular
web servers running, maybe an NGINX server, maybe you want to have access to a graphical
user interface to manage your system. All of these processes have to be controlled. And the
original way to control such processes was using Sys-V in NIT. Now one of the main features that
we have to understand with respect to Sys-V in NIT is the concept of run levels. So let's actually
discuss the process in action then. So when a Sys-V in NIT system happens to boot up, the very
first i.e. the number one process started by the kernel is something called NIT. This will always be
the very first process started by Sys-V in NIT. Now this process itself in NIT, this is used to start
all other processes. It's going to initialize all the other processes so to speak. Now what processes
are going to be started is going to be determined by this run level concept we're talking about here.
Or rather we're going to talk about should I say that we're just going to dig into. So what exactly
do I mean when I talk about a run level? Well really a run level is just like a category. And
this category is going to have particular services associated with it. So let's maybe just say you
want to have a graphical user interface so that not everything is just managed via the CLI. You
want to be able to click and you want to be able to drag and drop. Well the ability to have such a
graphical user interface like I say will be defined within a particular run level and we'll get to
see what those run levels are very very shortly. What is also important to note is that you yourself
can actually define what services and features are available in each run level. So if you want to be
able to control and do some type of modification that absolutely is possible for you as a system
administrator. Now we do have three different sets of run levels that we have to be aware of.
The very first one is called the Linux standard base. Okay now the second one is just called the
red hat set and the third one is called the Debian set. Now quite honestly the standard set this is
not really used quite so much but it's good for historical purposes. It lets you know why run levels
were developed in the first place. It gives you a sense of what they began with when they were
developing this concept. But the reality is we have two different modes of thought. If you happen to
have a Debian based system it makes sense that we're going to be using a Debian set and if you have a
red hat based system such as maybe say Rocky Linux or CentOS then you would follow the red hat set.
Now these actual run levels are pretty similar across these different definitions but there are
some slight variations. Let's actually talk about the run levels with respect to each different set.
So the very first run level we want to talk about is run level zero. Now within the Linux
standard base as well as the red hat set and the Debian set the definition of run level zero is
exactly the same across all three. We have no variation at all. Ultimately whether we're using
red hat or Debian or anything else if we use run level zero this is going to halt the system and
when I say to halt the system that just means to shut down the system. So run level zero across
all definitions going to do the same thing shut down the system. Now similarly with respect to
the next run level which is run level one this is also the same across all definitions in the
Linux standard base and the red hat set and the Debian set. No matter what we're using this is going
to invoke what is called single user mode. So think about this we know that we can have the
concept of multiple users on our system. Let's maybe say we had the user John and we had the user
Simona and the user Trevor as well as the administrator called Roots. If we happen to specify
that our system uses run level one we know this is going to be single user mode that means if
John tried to log into the system he would not be able to. If Simona tried to log into the system
she would not be able to and likewise Trevor would also be locked out. The only person the
single user who can log into the system will be that Root administrator. So run level one no
matter what your definition is going to lock down the system to only be accessed by the administrator.
So this is really all about locking down the system and limiting access to only the person
with the highest priorities available. Now the next run level we have is run level two. So we
can see we're just incrementing these numbers zero one two and there is a little bit of a difference
between the definitions right here. When we are talking about the Linux standard base what run
level two gives us it gives us multi user mode so that would mean that John and Simona and Trevor
could all log on to the system but there would be no networking okay. So this means if they want to
log into their Gmail account there's going to be no network access they can just access the system
without being able to connect to any other systems or computers. Also it's worth noting
that run level two means that we do not get a graphical user interface so whilst we can grant
multiple users access to the system all of those users must work directly from the command line.
Now with respect to Red Hat based systems run level two very very similar it's going to be
multi user modes but with no ability for network file sharing and similarly no ability for a
graphical user interface so very very similar in that respect no network file sharing everything
must be done via the CLI but multiple users can log on to the system so Trevor John and Simona
are going to be able to access the system at run level two. Now the difference here and this one
is quite a stark difference is that with the Debian sets at run level two we do get multi user
modes however networking is not disabled we do have networking and we also have a graphical user
interface and in fact for run levels two three four and five for Debian systems this definition
is exactly the same so run level two run level three run level four and run level five for Debian
based systems are all going to act in this manner multi user with network access with a graphical
user interface so keep that in mind so now as we progress to run level three we already know what
that is going to look like for Debian systems but what about with the Linux standard base well for
Linux standard base as well as our red hat systems this is going to be the exact same definition
we're going to get multi user modes and just like before we're not going to get a graphical user
interface but we will have network access in fact let me just write that a little bit clearer
so run level three LSB and red hat similar to the previous run level but this time we do have
network access we can share files we can talk to different computers we can access the internet so
on so forth now run level four with respect to run level four for the LSB this is actually not
defined there is no run level four for the Linux standard base however run level four for red hat
based systems is exactly the same as run level three so carbon copy right here and as we know
with Debian based systems two three four and five are all exactly the same and this is the part which
I find a little bit frustrating because ultimately I just feel this is unnecessarily confusing why
have multiple run levels that do the exact same thing sometimes I feel they're just trying to make
the exam a little bit more difficult to remember stuff but like I say I can't control this this
just as the way it is so again we move on on we go to run level five in the case of the Linux
standard base this is going to be a multi user mode so we can have multiple users and we're going to
get networking and we're going to get that graphical user interface and with red hat based systems
same type of deal we're going to get multi user modes we're going to get our networking access
and finally we're going to get our graphical user interface for red hat based systems and for Debian
as we know two three four and five all exactly the same and now we come to the last run level this
is run level six and you will be pleased to know that this is exactly the same across all definitions
whether it's Linux standard base red hat or Debian run level six will always reboot the system so run
level zero that will shut down the system run level six that will reboot the system and one two
three four and five depending on the definition will give you some combination of a cli or a
graphical user interface it will toggle single users and multi users and give different definitions
depending on the network access available now one thing to note is that you actually can define
additional run levels at run level seven eight and nine but there are no standards for these run
levels so there are no defaults defined now just a word on the applicability of these run levels
of course run level zero will be used if we want to shut down a system similarly run level six to
reboot a system also very very useful let's talk about run level one now now run level one is kind
of like safe mode on your system so to speak this is being kind of designed to fix really bad
problems if you are troubleshooting some type of serious issue on your machine you want to boot
up with minimal processes with only access to the root user so that you can fix these critical
issues say for example you may have a particular virus running on your system which is running on
a particular process you want to boot the system up with limited processes with only one user to
go in and try to fix that problem this is where you would want to be using run level one now run
level two on red hat systems this is not really used very often that is simply because networking
is so well vital to the day-to-day operations of a system administrator so just disabling
the networking not quite so common whereas on a debian based system we know run level two actually
does allow us to get networking access so it would be much more common on that type of distribution
now run level three at least in the red hat definition whereby we do not get a graphical
user interface this is very common to run on servers now the reason why is because it's more
lightweight so we don't need to have as much intensive processing power and also it reduces
the attack surface simply put the more processes and more applications running on your system the
more potential for an attacker to find a vulnerability in a particular application or a particular process
and gain access to the system so to limit things servers are often run without the graphical user
interface and for red hat based systems we know we can do this on run level three whereas run
level five this does provide the graphical user interface this is a common run level for client
desktop computers whereby the average user wants to have the ability to drag and drop and to access
the system in a nice friendly manner with this graphical user interface run level five would be
the run level for that scenario so that is us for our introduction into sysvianet and the run
levels what I now want to talk to you about is some configuration files with respect to our run
levels and well that's what we're talking about in the very next nuggets I hope this has been
informative for you and I'd like to thank you for viewing