1 00:00:00,240 --> 00:00:03,390 Hello everyone and welcome back to this lecture. 2 00:00:03,390 --> 00:00:11,670 Now in this trial we'll be covering some of the basically Nick's comments and in order for you to get 3 00:00:11,670 --> 00:00:13,160 to know Linux better. 4 00:00:13,170 --> 00:00:19,360 The good way would be to start off with learning these basic commands that I will teach you right now. 5 00:00:19,410 --> 00:00:24,820 So to start off we just want to open up our terminal which is this icon right here. 6 00:00:24,840 --> 00:00:26,060 So just click on it. 7 00:00:26,160 --> 00:00:27,780 It should open up this terminal. 8 00:00:28,080 --> 00:00:36,510 And if you want to you can enlarge it a little bit so you can see things better right here from this 9 00:00:36,510 --> 00:00:39,950 box right here will be running all our programs. 10 00:00:40,020 --> 00:00:46,470 Most of our programs and we will be running all of the other comments so you better get used to this 11 00:00:46,800 --> 00:00:49,750 as we will be doing most of our work from here. 12 00:00:50,460 --> 00:00:56,400 So the first comment I want to show you is be WD which stands for print working directory. 13 00:00:56,400 --> 00:01:02,580 So it basically just prints out the current directory that you are in which for in my case is slash 14 00:01:02,640 --> 00:01:03,270 root. 15 00:01:04,050 --> 00:01:10,520 Now if we want to change the rectory we would firstly need to know what sub directories are in slash 16 00:01:10,530 --> 00:01:15,310 root in order to list all the files and all the sub directories in slash root. 17 00:01:15,390 --> 00:01:23,020 We can just type here L S which will show us all of the current sub directories that are located in 18 00:01:23,020 --> 00:01:29,620 the slash root directory as we can see we have desktop documents downloads music pictures public and 19 00:01:29,710 --> 00:01:32,960 many more by many more I'm into more. 20 00:01:32,970 --> 00:01:38,770 So if you for example wanted to list all of the files that are in the slash through directory you would 21 00:01:38,770 --> 00:01:41,890 use it which you would do it with Alice. 22 00:01:42,160 --> 00:01:44,170 What else minus file a comment. 23 00:01:45,040 --> 00:01:49,050 What this does is basically it will print out same day. 24 00:01:49,270 --> 00:01:55,390 Also these sub directories but it will also print out the hidden files and hidden sub directories and 25 00:01:55,390 --> 00:02:02,230 we can see right here it's printed out more files than this command right here. 26 00:02:02,680 --> 00:02:09,370 So as you can see all of these files and start with DOT are not being seen in the Alice comment. 27 00:02:09,370 --> 00:02:16,900 So if you want to give to take a wide view on all of the current files into this slash root directory 28 00:02:16,930 --> 00:02:20,310 you can do it with Alice minus a leg comment. 29 00:02:20,450 --> 00:02:27,140 Now also one important comment is to clear screen so you don't see all of this all the time. 30 00:02:27,280 --> 00:02:32,600 You can do it with a simple command which basically just as it says just clears. 31 00:02:33,060 --> 00:02:34,430 So type here clear. 32 00:02:34,610 --> 00:02:42,400 And it should remove all of the commands that we ran previously and it should give us a new and freshly 33 00:02:42,670 --> 00:02:50,340 opened terminal for example let's say you wanted to go to the desktop directory which is up directory 34 00:02:50,340 --> 00:02:51,440 of slash route. 35 00:02:51,480 --> 00:02:57,310 You can do that with a simple two letter command which is basically just see the desktop. 36 00:02:57,830 --> 00:03:03,480 This C.D. stands for a change directory and it will basically just put us in the desktop directory right 37 00:03:03,480 --> 00:03:04,230 now. 38 00:03:04,260 --> 00:03:10,800 As you can see right here the terminal is now located in the slash desktop directory. 39 00:03:11,130 --> 00:03:18,420 If we type here the p WD once again it will show us that now our current directory is slash root slash 40 00:03:18,480 --> 00:03:19,950 desktop. 41 00:03:19,950 --> 00:03:26,550 Now let's say for example you wanted to create a file in the desktop directory. 42 00:03:26,640 --> 00:03:35,170 You can do that in with the simple command which is touch and let's say file want the file that the 43 00:03:35,210 --> 00:03:37,050 stay for example. 44 00:03:37,050 --> 00:03:43,050 And now if we type here our S which will list all the files in this directory it will just print out 45 00:03:43,230 --> 00:03:47,290 the file that the axes we created that file text the. 46 00:03:47,520 --> 00:03:50,460 The extent with this command right here. 47 00:03:50,550 --> 00:03:59,070 So basically touch command create files and the let's say right now we for example wanted to remove 48 00:03:59,070 --> 00:04:00,500 this file. 49 00:04:00,510 --> 00:04:07,380 Now how do we remove the file we remove it with also a two letter command which is just our plan stands 50 00:04:07,380 --> 00:04:08,460 for remote. 51 00:04:08,640 --> 00:04:15,870 So we just type here remove file dot DSD and if we type you Alice once again which will list all the 52 00:04:15,870 --> 00:04:21,600 parts in the directory we'll see nothing because the only file that was there was the file that we previously 53 00:04:21,600 --> 00:04:25,030 created and then after deleted it. 54 00:04:25,140 --> 00:04:27,550 So let's cover that once again. 55 00:04:27,600 --> 00:04:33,780 We are currently in the slash through slash desktop directory and if we want to create the file we basically 56 00:04:33,780 --> 00:04:36,480 type touch files of the estate. 57 00:04:36,990 --> 00:04:40,240 Now this doesn't have to be filed that Steve can be anything. 58 00:04:41,900 --> 00:04:43,430 That's the key. 59 00:04:43,540 --> 00:04:45,390 It can just basically be anything. 60 00:04:45,390 --> 00:04:49,710 So for example it doesn't even have to be dot the exceed so much anything. 61 00:04:49,740 --> 00:04:54,440 And if we type unless once again we can see there is a file called anything. 62 00:04:54,960 --> 00:04:56,930 So let's do again let's remove it. 63 00:04:56,940 --> 00:04:59,720 We type here are anything. 64 00:05:00,300 --> 00:05:02,090 And if we type unless one. 65 00:05:02,210 --> 00:05:06,980 So again it won't be there anymore. 66 00:05:07,030 --> 00:05:11,570 Now we covered how to make files right now. 67 00:05:11,590 --> 00:05:18,550 But let's say we for example wanted to create a sub directory in this nested directory so to make a 68 00:05:18,550 --> 00:05:27,250 directory which is basically just a folder you want to type the command and K here which stands for. 69 00:05:27,240 --> 00:05:33,750 Make the rectory and then type here the directory name you want to make. 70 00:05:33,760 --> 00:05:40,390 So for example let's say we want to make directory called Kelly it will and let's say we list right 71 00:05:40,390 --> 00:05:40,950 here. 72 00:05:41,050 --> 00:05:42,480 The current test the directory. 73 00:05:42,490 --> 00:05:46,610 It will have a sub directory called Kelly that we just created. 74 00:05:46,610 --> 00:05:54,790 Now you might notice that the sub directories are different color than the basic file so let's make 75 00:05:54,790 --> 00:05:58,970 our file one again file one sixty. 76 00:05:59,410 --> 00:06:04,540 And let's list again you can see that the file one that the T is white while the sub the rectory is 77 00:06:04,540 --> 00:06:05,060 blue. 78 00:06:05,410 --> 00:06:11,030 So files will be different color than sub directories you should know that. 79 00:06:11,170 --> 00:06:19,810 Well it's not that important but you will get used to it in time so let's delete the file once again 80 00:06:19,840 --> 00:06:21,080 with the R.M. comment. 81 00:06:21,280 --> 00:06:27,610 Now to delete the sub directory you want to use the same crime comment which is file one which is on 82 00:06:27,650 --> 00:06:34,660 the Mark Kelly but you will notice that if we wanted to leave it there Kelly it will says cannot remove 83 00:06:34,660 --> 00:06:37,050 Kelly is a directory. 84 00:06:37,360 --> 00:06:43,690 Now in order for us to delete the directory we need to add a minus r at the end of comment to just type 85 00:06:43,690 --> 00:06:44,930 here again. 86 00:06:45,370 --> 00:06:54,490 KELLY And just add here minus r and as you can see the command work properly and is free type S again 87 00:06:54,610 --> 00:07:04,510 it won't be there there is no Kelly directory anymore so let's clear our screen with the clear command. 88 00:07:04,640 --> 00:07:15,120 And right now I just want to tell you before I cut this editorial right here that the comment R N minus 89 00:07:15,210 --> 00:07:17,360 r is very dangerous. 90 00:07:17,400 --> 00:07:19,190 Now you might be asking why. 91 00:07:19,200 --> 00:07:21,240 Well basically I'll show you why. 92 00:07:21,240 --> 00:07:23,120 For example. 93 00:07:23,310 --> 00:07:29,890 Let's create a directory called filed for example. 94 00:07:29,890 --> 00:07:35,560 Here we can see with the allies command it's right there and we want to change our current directory 95 00:07:35,560 --> 00:07:37,550 into the file directory. 96 00:07:37,660 --> 00:07:43,460 We do it like this and you can see that our current path right now is slash desktop slash file where 97 00:07:43,510 --> 00:07:45,690 in the directory that we previously created. 98 00:07:46,390 --> 00:07:55,540 So now let's say that we create three files right here file one such file to touch file three and if 99 00:07:55,540 --> 00:08:01,510 we type Ellis here we can see that right now we have three files right here. 100 00:08:01,510 --> 00:08:06,130 Now why is the arm mind the Sarah comments so dangerous. 101 00:08:06,130 --> 00:08:18,630 Well if you're a root account and you just type here are a minus are part of me if you yes R.M. you 102 00:08:18,630 --> 00:08:26,640 will notice that the R.M. the star and then minus your comment deleted everything. 103 00:08:27,660 --> 00:08:34,680 So now you might be wondering so what which is deleted all three files in one command which basically 104 00:08:34,710 --> 00:08:41,390 this star right here is referring to all the files in the sub directorate. 105 00:08:41,430 --> 00:08:48,210 So if you type your disk command which is R.M. star minus r it will delete all of the files in the current 106 00:08:48,330 --> 00:08:49,590 directory. 107 00:08:49,890 --> 00:08:52,680 So as you can see we don't have any file left. 108 00:08:52,890 --> 00:08:59,250 Now the reason this is so dangerous is because if we go to the root directory and type the same command 109 00:09:01,000 --> 00:09:08,850 our REM star minus r it will basically delete all the files on the Linux system which will make your 110 00:09:09,070 --> 00:09:12,150 this machine crash and not work anymore. 111 00:09:12,150 --> 00:09:18,720 Now I'm not sure if they updated it and if it is for some permissions or not permissions but confirmation 112 00:09:18,720 --> 00:09:25,710 in order to run this comment but we will not tested right here because you will be deleting all of the 113 00:09:25,710 --> 00:09:35,240 files all of the files in this system so for this part want to drill that would be it will cover other 114 00:09:35,240 --> 00:09:41,690 comments in the tutorial with the basic Linux commands and I hope I see you there by.