1 00:00:00,180 --> 00:00:01,290 ‫Instructor: Hi. 2 00:00:01,290 --> 00:00:02,310 ‫Within this lecture. 3 00:00:02,310 --> 00:00:06,000 ‫We're gonna learn about a couple of new Linux comments, 4 00:00:06,000 --> 00:00:07,950 ‫and that includes the Nano 5 00:00:07,950 --> 00:00:10,830 ‫which is kind of an editor that you can use 6 00:00:10,830 --> 00:00:14,730 ‫in order to view the contents of the files and change them, 7 00:00:14,730 --> 00:00:16,950 ‫write those changes and stuff. 8 00:00:16,950 --> 00:00:20,520 ‫And we will actually use this a lot during the course. 9 00:00:20,520 --> 00:00:22,740 ‫So let me show you what I mean. 10 00:00:22,740 --> 00:00:26,040 ‫Right now I'm inside of Root folder. 11 00:00:26,040 --> 00:00:29,883 ‫I'm gonna see the dot dot and go into the Kali. 12 00:00:31,200 --> 00:00:32,340 ‫So remember, 13 00:00:32,340 --> 00:00:35,490 ‫we can go into the Kali and we can go into the documents 14 00:00:35,490 --> 00:00:40,490 ‫and we can even create any file over here with the route. 15 00:00:40,590 --> 00:00:41,790 ‫So for example, 16 00:00:41,790 --> 00:00:43,560 ‫I did that before, right? 17 00:00:43,560 --> 00:00:46,170 ‫Touch notes.txt 18 00:00:46,170 --> 00:00:47,310 ‫We did that before, 19 00:00:47,310 --> 00:00:50,250 ‫like a couple of lectures ago, right? 20 00:00:50,250 --> 00:00:53,250 ‫So you know the route can actually create 21 00:00:53,250 --> 00:00:57,540 ‫any file inside of any user's folder. 22 00:00:57,540 --> 00:01:00,870 ‫Right now I have created notes.txt. 23 00:01:00,870 --> 00:01:05,220 ‫Let's assume that I wanna go inside of that notes.txt 24 00:01:05,220 --> 00:01:06,750 ‫and write some notes. 25 00:01:06,750 --> 00:01:11,280 ‫Of course, I can download any editor using app 26 00:01:11,280 --> 00:01:12,660 ‫like the package manager. 27 00:01:12,660 --> 00:01:14,070 ‫Like we have learned before 28 00:01:14,070 --> 00:01:16,980 ‫Like Appt install this editor, 29 00:01:16,980 --> 00:01:20,640 ‫Appt install that editor and it would work. 30 00:01:20,640 --> 00:01:25,320 ‫But it comes to that when you know how to work with Nano 31 00:01:25,320 --> 00:01:27,210 ‫you can do that in Kali Linux, 32 00:01:27,210 --> 00:01:28,740 ‫you can do that in servers, 33 00:01:28,740 --> 00:01:31,590 ‫you can do that in Bantu and everything like that. 34 00:01:31,590 --> 00:01:32,550 ‫So first of all, 35 00:01:32,550 --> 00:01:34,650 ‫let me show you the cat comment. 36 00:01:34,650 --> 00:01:36,990 ‫So cat like in a cat. 37 00:01:36,990 --> 00:01:40,230 ‫So if you write this cat.notes.txt, 38 00:01:40,230 --> 00:01:44,610 ‫it actually reads the content of the notes. 39 00:01:44,610 --> 00:01:47,610 ‫Content of that file and show it to us. 40 00:01:47,610 --> 00:01:49,650 ‫Since we don't have anything, 41 00:01:49,650 --> 00:01:51,870 ‫it doesn't show up anything. 42 00:01:51,870 --> 00:01:54,750 ‫Right now I'm just gonna go ahead and nano of this. 43 00:01:54,750 --> 00:01:57,390 ‫Nano notes.txt. 44 00:01:57,390 --> 00:01:59,970 ‫So nano is and text editor 45 00:01:59,970 --> 00:02:02,730 ‫in which you can change the content of a file, 46 00:02:02,730 --> 00:02:04,890 ‫read the content of a file, 47 00:02:04,890 --> 00:02:06,240 ‫and write some codes, 48 00:02:06,240 --> 00:02:07,230 ‫write some comments, 49 00:02:07,230 --> 00:02:08,220 ‫whatever you want. 50 00:02:08,220 --> 00:02:10,860 ‫For example, if you write test, test, test, 51 00:02:10,860 --> 00:02:13,530 ‫you can see the available comments 52 00:02:13,530 --> 00:02:15,780 ‫inside of the nano over here. 53 00:02:15,780 --> 00:02:16,770 ‫For example, 54 00:02:16,770 --> 00:02:20,400 ‫you can write out the changes with control O. 55 00:02:20,400 --> 00:02:24,270 ‫You can cut the changes with control K. 56 00:02:24,270 --> 00:02:26,790 ‫Paste the changes with Control U. 57 00:02:26,790 --> 00:02:28,110 ‫So it's a little bit different 58 00:02:28,110 --> 00:02:30,420 ‫than what you used to do actually. 59 00:02:30,420 --> 00:02:33,960 ‫Not control X or control CNV 60 00:02:33,960 --> 00:02:34,950 ‫but it's not that our, 61 00:02:34,950 --> 00:02:38,010 ‫you can see all the shortcuts over here. 62 00:02:38,010 --> 00:02:38,843 ‫For example, 63 00:02:38,843 --> 00:02:40,890 ‫I have written this test, test, test. 64 00:02:40,890 --> 00:02:41,723 ‫If I want, 65 00:02:41,723 --> 00:02:44,430 ‫I can do control O, Enter. 66 00:02:44,430 --> 00:02:47,010 ‫Control O and Enter 67 00:02:47,010 --> 00:02:47,843 ‫In order to save this. 68 00:02:47,843 --> 00:02:51,600 ‫And control X to get out of it. 69 00:02:51,600 --> 00:02:54,360 ‫Right now if I do cat notes.txt, 70 00:02:54,360 --> 00:02:55,770 ‫here you go. 71 00:02:55,770 --> 00:03:00,420 ‫Those lines have been saved inside of the notes.txt. 72 00:03:00,420 --> 00:03:03,210 ‫And I can read it by cat comment. 73 00:03:03,210 --> 00:03:05,280 ‫So nano and cat. 74 00:03:05,280 --> 00:03:06,720 ‫So keep that in mind. 75 00:03:06,720 --> 00:03:08,550 ‫You can use Nano and Cat 76 00:03:08,550 --> 00:03:11,430 ‫and we will use them a lot during the lectures 77 00:03:11,430 --> 00:03:12,960 ‫as I said before. 78 00:03:12,960 --> 00:03:15,540 ‫So let me exit out of this one. 79 00:03:15,540 --> 00:03:18,840 ‫Let me open the Kali and I'm gonna show you something. 80 00:03:18,840 --> 00:03:21,333 ‫So I'm just gonna go into the document. 81 00:03:22,260 --> 00:03:25,350 ‫So I'm inside of my Kali user. 82 00:03:25,350 --> 00:03:27,720 ‫Here you go, notes.txt. 83 00:03:27,720 --> 00:03:30,270 ‫And if I nano notes.txt, 84 00:03:30,270 --> 00:03:32,070 ‫let's see what happens 85 00:03:32,070 --> 00:03:36,960 ‫It says that file notes.txt is unrightable. 86 00:03:36,960 --> 00:03:39,840 ‫Which means that I don't have the permission 87 00:03:39,840 --> 00:03:43,440 ‫of writing this inside of Kali user. 88 00:03:43,440 --> 00:03:47,160 ‫So this is one of the difference between the Kali and Roots. 89 00:03:47,160 --> 00:03:48,720 ‫So even if I write something 90 00:03:48,720 --> 00:03:52,320 ‫and even if I try to do control or and enter, 91 00:03:52,320 --> 00:03:53,580 ‫it won't work. 92 00:03:53,580 --> 00:03:56,070 ‫As you can see, doesn't work. 93 00:03:56,070 --> 00:03:58,950 ‫So I don't have the permission. 94 00:03:58,950 --> 00:04:01,170 ‫This is not related to Nano 95 00:04:01,170 --> 00:04:04,320 ‫since I don't have the permission to do that. 96 00:04:04,320 --> 00:04:05,153 ‫By the way, 97 00:04:05,153 --> 00:04:08,730 ‫I believe we have to say no to get out of this one. 98 00:04:08,730 --> 00:04:12,540 ‫But I have the permission to read notes.txt. 99 00:04:12,540 --> 00:04:13,373 ‫As you can see, 100 00:04:13,373 --> 00:04:15,900 ‫if I do Cat notes.txt 101 00:04:15,900 --> 00:04:17,610 ‫I can see all the tests. 102 00:04:17,610 --> 00:04:20,070 ‫But if I do pseudo zoo 103 00:04:20,070 --> 00:04:22,647 ‫and I can go to the Nano test.txt 104 00:04:22,647 --> 00:04:25,350 ‫and I can just change it in a way that I want. 105 00:04:25,350 --> 00:04:29,850 ‫And I can just do control O and control X to save it. 106 00:04:29,850 --> 00:04:30,780 ‫Okay? 107 00:04:30,780 --> 00:04:34,263 ‫Control, O, enter control X to get out of this one. 108 00:04:35,160 --> 00:04:39,900 ‫And if you see me use Leaf Pad during the lectures 109 00:04:39,900 --> 00:04:41,190 ‫during the course, 110 00:04:41,190 --> 00:04:43,860 ‫you can use Lift Padd or Nano as well. 111 00:04:43,860 --> 00:04:46,710 ‫And there is also something called vim. 112 00:04:46,710 --> 00:04:49,140 ‫Of course this is a good editor as well 113 00:04:49,140 --> 00:04:52,710 ‫but it is very hard to use if you're a beginner. 114 00:04:52,710 --> 00:04:54,570 ‫So I wouldn't suggest you use it. 115 00:04:54,570 --> 00:04:56,850 ‫You can go with Nano, okay? 116 00:04:56,850 --> 00:05:00,630 ‫And you can go with lift pad or anything like that. 117 00:05:00,630 --> 00:05:03,150 ‫But Nano is simple, 118 00:05:03,150 --> 00:05:04,710 ‫Nano is efficient 119 00:05:04,710 --> 00:05:07,950 ‫and you can use it across the Linux distributions as well. 120 00:05:07,950 --> 00:05:10,770 ‫It's almost available in every one of them. 121 00:05:10,770 --> 00:05:13,953 ‫So let's stop here and continue with the next one.