1
00:00:00,000 --> 00:00:17,760
Hey guys and welcome back. So in this nugget right here, what we're going to be talking

2
00:00:17,760 --> 00:00:23,760
about is the startup configurations for our system. And what we are really going to be

3
00:00:23,760 --> 00:00:32,480
focusing on is something called Sys-V in NIT. Now here is the deal. When you start on your

4
00:00:32,480 --> 00:00:38,640
computer, certain services are going to have to be started. Maybe you want to have particular

5
00:00:38,640 --> 00:00:43,359
web servers running, maybe an NGINX server, maybe you want to have access to a graphical

6
00:00:43,359 --> 00:00:49,520
user interface to manage your system. All of these processes have to be controlled. And the

7
00:00:49,520 --> 00:00:56,640
original way to control such processes was using Sys-V in NIT. Now one of the main features that

8
00:00:56,640 --> 00:01:03,680
we have to understand with respect to Sys-V in NIT is the concept of run levels. So let's actually

9
00:01:03,680 --> 00:01:11,520
discuss the process in action then. So when a Sys-V in NIT system happens to boot up, the very

10
00:01:11,599 --> 00:01:19,759
first i.e. the number one process started by the kernel is something called NIT. This will always be

11
00:01:19,759 --> 00:01:27,439
the very first process started by Sys-V in NIT. Now this process itself in NIT, this is used to start

12
00:01:27,439 --> 00:01:34,079
all other processes. It's going to initialize all the other processes so to speak. Now what processes

13
00:01:34,079 --> 00:01:40,479
are going to be started is going to be determined by this run level concept we're talking about here.

14
00:01:40,480 --> 00:01:44,880
Or rather we're going to talk about should I say that we're just going to dig into. So what exactly

15
00:01:44,880 --> 00:01:52,079
do I mean when I talk about a run level? Well really a run level is just like a category. And

16
00:01:52,079 --> 00:01:58,400
this category is going to have particular services associated with it. So let's maybe just say you

17
00:01:58,400 --> 00:02:04,400
want to have a graphical user interface so that not everything is just managed via the CLI. You

18
00:02:04,400 --> 00:02:09,520
want to be able to click and you want to be able to drag and drop. Well the ability to have such a

19
00:02:09,520 --> 00:02:15,600
graphical user interface like I say will be defined within a particular run level and we'll get to

20
00:02:15,600 --> 00:02:21,280
see what those run levels are very very shortly. What is also important to note is that you yourself

21
00:02:21,280 --> 00:02:26,719
can actually define what services and features are available in each run level. So if you want to be

22
00:02:26,719 --> 00:02:33,040
able to control and do some type of modification that absolutely is possible for you as a system

23
00:02:33,120 --> 00:02:40,000
administrator. Now we do have three different sets of run levels that we have to be aware of.

24
00:02:40,000 --> 00:02:47,519
The very first one is called the Linux standard base. Okay now the second one is just called the

25
00:02:47,519 --> 00:02:55,120
red hat set and the third one is called the Debian set. Now quite honestly the standard set this is

26
00:02:55,120 --> 00:03:01,120
not really used quite so much but it's good for historical purposes. It lets you know why run levels

27
00:03:01,120 --> 00:03:05,840
were developed in the first place. It gives you a sense of what they began with when they were

28
00:03:05,840 --> 00:03:11,200
developing this concept. But the reality is we have two different modes of thought. If you happen to

29
00:03:11,200 --> 00:03:17,120
have a Debian based system it makes sense that we're going to be using a Debian set and if you have a

30
00:03:17,120 --> 00:03:24,719
red hat based system such as maybe say Rocky Linux or CentOS then you would follow the red hat set.

31
00:03:24,719 --> 00:03:31,040
Now these actual run levels are pretty similar across these different definitions but there are

32
00:03:31,120 --> 00:03:38,560
some slight variations. Let's actually talk about the run levels with respect to each different set.

33
00:03:38,560 --> 00:03:45,439
So the very first run level we want to talk about is run level zero. Now within the Linux

34
00:03:45,439 --> 00:03:53,599
standard base as well as the red hat set and the Debian set the definition of run level zero is

35
00:03:53,599 --> 00:04:00,159
exactly the same across all three. We have no variation at all. Ultimately whether we're using

36
00:04:00,240 --> 00:04:07,680
red hat or Debian or anything else if we use run level zero this is going to halt the system and

37
00:04:07,680 --> 00:04:14,319
when I say to halt the system that just means to shut down the system. So run level zero across

38
00:04:14,319 --> 00:04:20,959
all definitions going to do the same thing shut down the system. Now similarly with respect to

39
00:04:20,959 --> 00:04:28,319
the next run level which is run level one this is also the same across all definitions in the

40
00:04:28,879 --> 00:04:35,519
Linux standard base and the red hat set and the Debian set. No matter what we're using this is going

41
00:04:35,519 --> 00:04:42,959
to invoke what is called single user mode. So think about this we know that we can have the

42
00:04:42,959 --> 00:04:49,680
concept of multiple users on our system. Let's maybe say we had the user John and we had the user

43
00:04:49,680 --> 00:04:56,959
Simona and the user Trevor as well as the administrator called Roots. If we happen to specify

44
00:04:56,959 --> 00:05:04,560
that our system uses run level one we know this is going to be single user mode that means if

45
00:05:04,560 --> 00:05:10,719
John tried to log into the system he would not be able to. If Simona tried to log into the system

46
00:05:10,719 --> 00:05:16,319
she would not be able to and likewise Trevor would also be locked out. The only person the

47
00:05:16,319 --> 00:05:22,799
single user who can log into the system will be that Root administrator. So run level one no

48
00:05:22,800 --> 00:05:28,800
matter what your definition is going to lock down the system to only be accessed by the administrator.

49
00:05:28,800 --> 00:05:35,520
So this is really all about locking down the system and limiting access to only the person

50
00:05:35,520 --> 00:05:42,960
with the highest priorities available. Now the next run level we have is run level two. So we

51
00:05:42,960 --> 00:05:49,360
can see we're just incrementing these numbers zero one two and there is a little bit of a difference

52
00:05:49,360 --> 00:05:55,199
between the definitions right here. When we are talking about the Linux standard base what run

53
00:05:55,199 --> 00:06:01,280
level two gives us it gives us multi user mode so that would mean that John and Simona and Trevor

54
00:06:01,280 --> 00:06:07,840
could all log on to the system but there would be no networking okay. So this means if they want to

55
00:06:07,840 --> 00:06:13,439
log into their Gmail account there's going to be no network access they can just access the system

56
00:06:13,439 --> 00:06:18,800
without being able to connect to any other systems or computers. Also it's worth noting

57
00:06:18,800 --> 00:06:24,879
that run level two means that we do not get a graphical user interface so whilst we can grant

58
00:06:24,879 --> 00:06:31,040
multiple users access to the system all of those users must work directly from the command line.

59
00:06:31,040 --> 00:06:38,079
Now with respect to Red Hat based systems run level two very very similar it's going to be

60
00:06:38,159 --> 00:06:46,159
multi user modes but with no ability for network file sharing and similarly no ability for a

61
00:06:46,159 --> 00:06:51,439
graphical user interface so very very similar in that respect no network file sharing everything

62
00:06:51,439 --> 00:06:57,519
must be done via the CLI but multiple users can log on to the system so Trevor John and Simona

63
00:06:57,519 --> 00:07:02,479
are going to be able to access the system at run level two. Now the difference here and this one

64
00:07:02,480 --> 00:07:10,160
is quite a stark difference is that with the Debian sets at run level two we do get multi user

65
00:07:10,160 --> 00:07:17,920
modes however networking is not disabled we do have networking and we also have a graphical user

66
00:07:17,920 --> 00:07:26,960
interface and in fact for run levels two three four and five for Debian systems this definition

67
00:07:26,959 --> 00:07:33,599
is exactly the same so run level two run level three run level four and run level five for Debian

68
00:07:33,599 --> 00:07:40,479
based systems are all going to act in this manner multi user with network access with a graphical

69
00:07:40,479 --> 00:07:47,439
user interface so keep that in mind so now as we progress to run level three we already know what

70
00:07:47,439 --> 00:07:53,839
that is going to look like for Debian systems but what about with the Linux standard base well for

71
00:07:53,919 --> 00:07:59,519
Linux standard base as well as our red hat systems this is going to be the exact same definition

72
00:07:59,519 --> 00:08:05,279
we're going to get multi user modes and just like before we're not going to get a graphical user

73
00:08:05,279 --> 00:08:10,959
interface but we will have network access in fact let me just write that a little bit clearer

74
00:08:11,679 --> 00:08:18,719
so run level three LSB and red hat similar to the previous run level but this time we do have

75
00:08:18,720 --> 00:08:25,120
network access we can share files we can talk to different computers we can access the internet so

76
00:08:25,120 --> 00:08:32,879
on so forth now run level four with respect to run level four for the LSB this is actually not

77
00:08:32,879 --> 00:08:40,480
defined there is no run level four for the Linux standard base however run level four for red hat

78
00:08:40,480 --> 00:08:47,600
based systems is exactly the same as run level three so carbon copy right here and as we know

79
00:08:47,600 --> 00:08:53,279
with Debian based systems two three four and five are all exactly the same and this is the part which

80
00:08:53,279 --> 00:09:00,159
I find a little bit frustrating because ultimately I just feel this is unnecessarily confusing why

81
00:09:00,159 --> 00:09:05,840
have multiple run levels that do the exact same thing sometimes I feel they're just trying to make

82
00:09:05,840 --> 00:09:11,120
the exam a little bit more difficult to remember stuff but like I say I can't control this this

83
00:09:11,200 --> 00:09:18,960
just as the way it is so again we move on on we go to run level five in the case of the Linux

84
00:09:18,960 --> 00:09:25,440
standard base this is going to be a multi user mode so we can have multiple users and we're going to

85
00:09:25,440 --> 00:09:31,600
get networking and we're going to get that graphical user interface and with red hat based systems

86
00:09:31,600 --> 00:09:36,639
same type of deal we're going to get multi user modes we're going to get our networking access

87
00:09:36,639 --> 00:09:43,039
and finally we're going to get our graphical user interface for red hat based systems and for Debian

88
00:09:43,039 --> 00:09:49,439
as we know two three four and five all exactly the same and now we come to the last run level this

89
00:09:49,439 --> 00:09:56,159
is run level six and you will be pleased to know that this is exactly the same across all definitions

90
00:09:56,159 --> 00:10:03,600
whether it's Linux standard base red hat or Debian run level six will always reboot the system so run

91
00:10:03,600 --> 00:10:09,440
level zero that will shut down the system run level six that will reboot the system and one two

92
00:10:09,440 --> 00:10:15,519
three four and five depending on the definition will give you some combination of a cli or a

93
00:10:15,519 --> 00:10:22,080
graphical user interface it will toggle single users and multi users and give different definitions

94
00:10:22,080 --> 00:10:28,320
depending on the network access available now one thing to note is that you actually can define

95
00:10:28,320 --> 00:10:35,040
additional run levels at run level seven eight and nine but there are no standards for these run

96
00:10:35,040 --> 00:10:41,280
levels so there are no defaults defined now just a word on the applicability of these run levels

97
00:10:41,280 --> 00:10:47,600
of course run level zero will be used if we want to shut down a system similarly run level six to

98
00:10:47,600 --> 00:10:54,320
reboot a system also very very useful let's talk about run level one now now run level one is kind

99
00:10:54,320 --> 00:10:59,840
of like safe mode on your system so to speak this is being kind of designed to fix really bad

100
00:10:59,840 --> 00:11:05,520
problems if you are troubleshooting some type of serious issue on your machine you want to boot

101
00:11:05,520 --> 00:11:12,000
up with minimal processes with only access to the root user so that you can fix these critical

102
00:11:12,000 --> 00:11:18,240
issues say for example you may have a particular virus running on your system which is running on

103
00:11:18,240 --> 00:11:24,320
a particular process you want to boot the system up with limited processes with only one user to

104
00:11:24,320 --> 00:11:30,639
go in and try to fix that problem this is where you would want to be using run level one now run

105
00:11:30,639 --> 00:11:37,840
level two on red hat systems this is not really used very often that is simply because networking

106
00:11:37,840 --> 00:11:43,919
is so well vital to the day-to-day operations of a system administrator so just disabling

107
00:11:44,000 --> 00:11:50,479
the networking not quite so common whereas on a debian based system we know run level two actually

108
00:11:50,479 --> 00:11:56,639
does allow us to get networking access so it would be much more common on that type of distribution

109
00:11:57,279 --> 00:12:04,240
now run level three at least in the red hat definition whereby we do not get a graphical

110
00:12:04,240 --> 00:12:10,319
user interface this is very common to run on servers now the reason why is because it's more

111
00:12:10,320 --> 00:12:16,480
lightweight so we don't need to have as much intensive processing power and also it reduces

112
00:12:16,480 --> 00:12:23,360
the attack surface simply put the more processes and more applications running on your system the

113
00:12:23,360 --> 00:12:30,400
more potential for an attacker to find a vulnerability in a particular application or a particular process

114
00:12:30,400 --> 00:12:36,800
and gain access to the system so to limit things servers are often run without the graphical user

115
00:12:36,799 --> 00:12:44,000
interface and for red hat based systems we know we can do this on run level three whereas run

116
00:12:44,000 --> 00:12:50,719
level five this does provide the graphical user interface this is a common run level for client

117
00:12:50,719 --> 00:12:56,959
desktop computers whereby the average user wants to have the ability to drag and drop and to access

118
00:12:56,959 --> 00:13:02,399
the system in a nice friendly manner with this graphical user interface run level five would be

119
00:13:02,399 --> 00:13:09,039
the run level for that scenario so that is us for our introduction into sysvianet and the run

120
00:13:09,039 --> 00:13:15,039
levels what I now want to talk to you about is some configuration files with respect to our run

121
00:13:15,039 --> 00:13:19,439
levels and well that's what we're talking about in the very next nuggets I hope this has been

122
00:13:19,439 --> 00:13:22,639
informative for you and I'd like to thank you for viewing

