1 00:00:00,240 --> 00:00:01,073 ‫Instructor: Hi. 2 00:00:01,073 --> 00:00:03,030 ‫So within the previous lectures 3 00:00:03,030 --> 00:00:05,250 ‫we have seen many folders 4 00:00:05,250 --> 00:00:09,150 ‫inside of the Linux root folder, right, 5 00:00:09,150 --> 00:00:10,890 ‫when we opened the file system. 6 00:00:10,890 --> 00:00:14,760 ‫We have seen many things like etc, home, 7 00:00:14,760 --> 00:00:17,730 ‫mnt, run, stuff like that. 8 00:00:17,730 --> 00:00:20,250 ‫So we need to understand what they do 9 00:00:20,250 --> 00:00:24,540 ‫and how they are configured or how they are structured. 10 00:00:24,540 --> 00:00:26,520 ‫So if you open the file system 11 00:00:26,520 --> 00:00:30,900 ‫we can see all the files and folders that I'm talking about. 12 00:00:30,900 --> 00:00:32,850 ‫So make sure you're in the file system 13 00:00:32,850 --> 00:00:35,040 ‫and you should be seeing all this. 14 00:00:35,040 --> 00:00:38,100 ‫So this is the Linux foldering system 15 00:00:38,100 --> 00:00:40,620 ‫and it's not only for Kali Linux, 16 00:00:40,620 --> 00:00:43,710 ‫it's still more or less the same 17 00:00:43,710 --> 00:00:47,160 ‫in other Linux distributions as well. 18 00:00:47,160 --> 00:00:49,950 ‫So we need to understand what goes on 19 00:00:49,950 --> 00:00:52,080 ‫inside of those things. 20 00:00:52,080 --> 00:00:54,540 ‫So it's a little bit different architecture 21 00:00:54,540 --> 00:00:56,130 ‫than the Windows. 22 00:00:56,130 --> 00:00:57,570 ‫Actually, it's a lot different 23 00:00:57,570 --> 00:01:02,280 ‫because assume that you're actually installing a program 24 00:01:02,280 --> 00:01:05,580 ‫or a software inside of Windows, right? 25 00:01:05,580 --> 00:01:07,920 ‫It just goes under program files, 26 00:01:07,920 --> 00:01:11,250 ‫or whatever you may want to state over there. 27 00:01:11,250 --> 00:01:15,900 ‫But in the Linux it can go into multiple folders. 28 00:01:15,900 --> 00:01:19,260 ‫For example, in the bin folder over here 29 00:01:19,260 --> 00:01:21,600 ‫you see the binaries. Okay? 30 00:01:21,600 --> 00:01:23,160 ‫So these are the programs, 31 00:01:23,160 --> 00:01:27,090 ‫these are the softwares that you execute. 32 00:01:27,090 --> 00:01:29,940 ‫For example, when you write ls, 33 00:01:29,940 --> 00:01:33,180 ‫or the other comments like this, here you go, 34 00:01:33,180 --> 00:01:36,450 ‫there is ls inside of the bin folder. 35 00:01:36,450 --> 00:01:39,600 ‫So when you type ls inside of Terminal 36 00:01:39,600 --> 00:01:44,600 ‫it executes that binary by looking at this bin folder, okay? 37 00:01:45,180 --> 00:01:48,600 ‫But you can find some different files and folders 38 00:01:48,600 --> 00:01:52,770 ‫or configurations of ls in other folders. 39 00:01:52,770 --> 00:01:56,850 ‫So ls can just sit in there, ls is just an example. 40 00:01:56,850 --> 00:02:00,600 ‫But, when we look at the sbin, for example, 41 00:02:00,600 --> 00:02:02,760 ‫this is system binaries. 42 00:02:02,760 --> 00:02:05,310 ‫So a lot of things that root executes 43 00:02:05,310 --> 00:02:09,510 ‫are located inside of this sbin folder. 44 00:02:09,510 --> 00:02:12,300 ‫So maybe ls does not have any configuration 45 00:02:12,300 --> 00:02:15,540 ‫but the other files and other systems 46 00:02:15,540 --> 00:02:19,590 ‫can have configurations scattered around these folders 47 00:02:19,590 --> 00:02:21,360 ‫depending on what they are. 48 00:02:21,360 --> 00:02:23,850 ‫So it's different than Windows. 49 00:02:23,850 --> 00:02:26,820 ‫And in fact, it doesn't create any difference for us 50 00:02:26,820 --> 00:02:28,980 ‫because we will see the package managers 51 00:02:28,980 --> 00:02:30,270 ‫in the next lecture. 52 00:02:30,270 --> 00:02:34,350 ‫It's very easy to install a software inside of Kali Linux 53 00:02:34,350 --> 00:02:36,900 ‫but you need to understand how it works 54 00:02:36,900 --> 00:02:38,643 ‫in background, right? 55 00:02:39,510 --> 00:02:42,870 ‫So, it actually scatters the files and folders 56 00:02:42,870 --> 00:02:44,820 ‫depending on what they are, 57 00:02:44,820 --> 00:02:46,260 ‫depending on the structure 58 00:02:46,260 --> 00:02:49,350 ‫that has been created for us over here. 59 00:02:49,350 --> 00:02:52,110 ‫So, let's try to look at some of these folders 60 00:02:52,110 --> 00:02:56,820 ‫and at least try to understand what goes inside of those. 61 00:02:56,820 --> 00:03:00,210 ‫For example, we have etc or dev over here. 62 00:03:00,210 --> 00:03:03,630 ‫For example, inside of dev there are files 63 00:03:03,630 --> 00:03:07,350 ‫regarding to hardware like disc files and something. 64 00:03:07,350 --> 00:03:11,910 ‫And inside of etc we have configuration files. 65 00:03:11,910 --> 00:03:15,240 ‫Again, a binary can be in the bin folder 66 00:03:15,240 --> 00:03:18,750 ‫or any other folder that you have installed it to 67 00:03:18,750 --> 00:03:22,290 ‫but maybe the configuration files of that binary 68 00:03:22,290 --> 00:03:24,330 ‫can be sitting in the etc. 69 00:03:24,330 --> 00:03:27,960 ‫So we're gonna use etc a lot during the course 70 00:03:27,960 --> 00:03:31,500 ‫and we're gonna use many of them by the way, 71 00:03:31,500 --> 00:03:34,890 ‫but you need to understand why we are using them, okay? 72 00:03:34,890 --> 00:03:37,680 ‫That's why we are having this lecture. 73 00:03:37,680 --> 00:03:40,890 ‫And you may come across this kind of questions 74 00:03:40,890 --> 00:03:44,130 ‫in cyber security interviews by the way, 75 00:03:44,130 --> 00:03:47,340 ‫they can ask you, what's an etc? 76 00:03:47,340 --> 00:03:50,280 ‫What's a var folder? Okay? 77 00:03:50,280 --> 00:03:53,880 ‫So, let's go to the var folder while we speak of it. 78 00:03:53,880 --> 00:03:55,380 ‫var stands for variables. 79 00:03:55,380 --> 00:03:58,890 ‫So we actually store some kind of variable files over here 80 00:03:58,890 --> 00:04:03,890 ‫like log files, and we also have the web server 81 00:04:03,930 --> 00:04:05,970 ‫inside of this var folder as well. 82 00:04:05,970 --> 00:04:09,000 ‫So we're gonna be using this var folder a lot 83 00:04:09,000 --> 00:04:11,190 ‫for the www folder. Here you go. 84 00:04:11,190 --> 00:04:13,590 ‫That's the one that I'm looking for. 85 00:04:13,590 --> 00:04:16,920 ‫And this is the web server file folder 86 00:04:16,920 --> 00:04:20,163 ‫that we will be using a lot during this class. 87 00:04:21,000 --> 00:04:23,730 ‫So after var, maybe we can go to tmp, 88 00:04:23,730 --> 00:04:25,470 ‫which stands for temporary. 89 00:04:25,470 --> 00:04:29,700 ‫So, if Binary creates a temporary file and folder 90 00:04:29,700 --> 00:04:32,340 ‫they can store it in the tmp folder. 91 00:04:32,340 --> 00:04:35,880 ‫They do not necessarily have to store it over here 92 00:04:35,880 --> 00:04:38,910 ‫but it's the main convention as you can see. 93 00:04:38,910 --> 00:04:42,180 ‫There are temporary folders over there. 94 00:04:42,180 --> 00:04:44,760 ‫So maybe they will get deleted automatically 95 00:04:44,760 --> 00:04:46,590 ‫after they're done. 96 00:04:46,590 --> 00:04:48,870 ‫So home folder, we have already seen this. 97 00:04:48,870 --> 00:04:51,660 ‫We actually store the user folders 98 00:04:51,660 --> 00:04:53,220 ‫inside of the home folder. 99 00:04:53,220 --> 00:04:55,500 ‫Right now, I see the Kali, 100 00:04:55,500 --> 00:04:57,660 ‫maybe you are seeing something else. 101 00:04:57,660 --> 00:05:00,630 ‫But also, we have the root user folder over here 102 00:05:00,630 --> 00:05:03,990 ‫which can be accessed by only the root user 103 00:05:03,990 --> 00:05:07,170 ‫as we have seen before. Okay. 104 00:05:07,170 --> 00:05:11,070 ‫Root folder can be like the separated 105 00:05:11,070 --> 00:05:13,950 ‫from the other users in the root folder 106 00:05:13,950 --> 00:05:16,560 ‫root of the file system, 107 00:05:16,560 --> 00:05:21,540 ‫so that it can be differentiated as well as in this case. 108 00:05:21,540 --> 00:05:24,600 ‫So there is a proc folder and mnt folder 109 00:05:24,600 --> 00:05:25,470 ‫right next to them. 110 00:05:25,470 --> 00:05:28,890 ‫Proc stores the process information 111 00:05:28,890 --> 00:05:33,630 ‫and mnt stores the temporary mounted, for example. 112 00:05:33,630 --> 00:05:36,120 ‫I believe there's nothing over here. 113 00:05:36,120 --> 00:05:39,810 ‫Okay, let's go to like, media. 114 00:05:39,810 --> 00:05:41,790 ‫There is a media folder over there. 115 00:05:41,790 --> 00:05:46,050 ‫Media, actually, it isn't media like pictures and stuff. 116 00:05:46,050 --> 00:05:50,490 ‫It's drivers and USBs and CD ROMS and stuff 117 00:05:50,490 --> 00:05:53,700 ‫inside of the media folder. Okay? 118 00:05:53,700 --> 00:05:55,980 ‫So right now I believe you don't have anything 119 00:05:55,980 --> 00:06:00,980 ‫other than the CD ROMS that comes like predefined over here. 120 00:06:02,280 --> 00:06:05,040 ‫So let's see, we have boot, of course, 121 00:06:05,040 --> 00:06:08,490 ‫this is for booting the Kali Linux, okay? 122 00:06:08,490 --> 00:06:10,500 ‫We generally don't wanna delete that 123 00:06:10,500 --> 00:06:15,500 ‫or any temperament with that, so we just leave it as it is. 124 00:06:15,960 --> 00:06:20,100 ‫So, let's see, we have a service folder over here, 125 00:06:20,100 --> 00:06:24,270 ‫srv folder. You may find it over here. 126 00:06:24,270 --> 00:06:26,940 ‫So, we store the service information, 127 00:06:26,940 --> 00:06:31,230 ‫services running inside of Kali Linux over there. 128 00:06:31,230 --> 00:06:34,950 ‫So you don't have to go into those folders and do something 129 00:06:34,950 --> 00:06:37,470 ‫but you need to understand what they do 130 00:06:37,470 --> 00:06:41,310 ‫'cause we're gonna be using those things a lot. Okay? 131 00:06:41,310 --> 00:06:44,340 ‫So, let's go and find something. 132 00:06:44,340 --> 00:06:46,440 ‫Yeah, user or usr. 133 00:06:46,440 --> 00:06:50,220 ‫So generally we store the files that is going to be 134 00:06:50,220 --> 00:06:52,980 ‫or the binaries that is going to be created 135 00:06:52,980 --> 00:06:56,070 ‫or used by users under this folder. 136 00:06:56,070 --> 00:07:01,070 ‫But again, this is not something that is mandatory, okay? 137 00:07:01,140 --> 00:07:04,200 ‫There is an opt folder that we can use 138 00:07:04,200 --> 00:07:07,470 ‫for optional softwares, optional tools. 139 00:07:07,470 --> 00:07:09,750 ‫So we can actually install stuff 140 00:07:09,750 --> 00:07:13,440 ‫rather than usr to the opt folder as well. 141 00:07:13,440 --> 00:07:16,890 ‫So, we are going to be using those kind of folders 142 00:07:16,890 --> 00:07:20,130 ‫in the upcoming lectures and you will see what I mean 143 00:07:20,130 --> 00:07:22,890 ‫but you need to understand why we are doing it. 144 00:07:22,890 --> 00:07:27,060 ‫So, I'm just showing you all of those stuff. 145 00:07:27,060 --> 00:07:30,210 ‫So there are some library folders over there. 146 00:07:30,210 --> 00:07:33,660 ‫Again, we don't have to go into library folders 147 00:07:33,660 --> 00:07:37,080 ‫or download something to put it over there, 148 00:07:37,080 --> 00:07:39,060 ‫but you see what I mean. 149 00:07:39,060 --> 00:07:41,190 ‫So there is a collection of folders 150 00:07:41,190 --> 00:07:46,190 ‫and every folder has its own meaning, has its own purpose. 151 00:07:46,770 --> 00:07:49,560 ‫It's not mandatory in many cases 152 00:07:49,560 --> 00:07:52,410 ‫but we're going to be using them, 153 00:07:52,410 --> 00:07:56,370 ‫so I believe it was vital for you to understand that. 154 00:07:56,370 --> 00:07:58,800 ‫Let's stop here and let's go do something 155 00:07:58,800 --> 00:08:00,663 ‫more fun in the next lecture.