1 00:00:00,520 --> 00:00:04,130 OK, so we have covered a few comments in the last video. 2 00:00:04,840 --> 00:00:11,830 Let's learn a little bit more just so we can feel confident when we get to use the word terminal later 3 00:00:11,860 --> 00:00:12,550 in the course. 4 00:00:13,270 --> 00:00:17,440 Another important comment that you will use a lot is called pseudo. 5 00:00:18,220 --> 00:00:25,690 Now, pseudo allows us to run certain commands as truth account or in other words, as an administrator 6 00:00:25,690 --> 00:00:26,200 account. 7 00:00:27,060 --> 00:00:33,080 For those of you who don't know, Ruth account on Linux is something similar as administrator on Windows. 8 00:00:33,780 --> 00:00:39,840 So let's check Suda comment by running it with another familiar comment that we already covered, which 9 00:00:39,840 --> 00:00:41,060 is touch comment. 10 00:00:41,730 --> 00:00:49,420 So if I typed this pseudo and then touch and then file one, let's see what will happen. 11 00:00:49,560 --> 00:00:51,690 So I'm just going to press enter. 12 00:00:52,470 --> 00:00:52,760 Hmm. 13 00:00:53,070 --> 00:00:59,640 It asks for password, which makes sense because we're actually trying to create a file with elevated 14 00:00:59,730 --> 00:01:00,450 privileges. 15 00:01:00,840 --> 00:01:06,570 So the actual password that you want to type here is the same password that you used once you created 16 00:01:06,570 --> 00:01:09,240 an account during the installation of Linux. 17 00:01:09,960 --> 00:01:12,270 So I'm just going to type mine right here. 18 00:01:13,050 --> 00:01:14,970 And the file has been created. 19 00:01:15,630 --> 00:01:17,850 We can check it by typing Allez. 20 00:01:18,270 --> 00:01:25,470 And now that we created file one with elevated privileges, you will also notice that on desktop, if 21 00:01:25,470 --> 00:01:32,130 I lower my terminal, this file one has a lock on its icon, as we can see right here. 22 00:01:33,190 --> 00:01:38,020 This means we cannot change content of the file as a regular user. 23 00:01:38,590 --> 00:01:39,720 Let me show you what I mean. 24 00:01:40,210 --> 00:01:48,610 If I also go and create a file as our Mr. Hacker can't just be typing oops, just by typing touch and 25 00:01:48,610 --> 00:01:49,480 then file to. 26 00:01:51,820 --> 00:01:57,560 Here, if we take a look, this falta won't have any locks on its. 27 00:01:58,570 --> 00:02:01,120 This is a file that we created is a regular user. 28 00:02:01,720 --> 00:02:04,120 OK, we'll get back to this in just a second. 29 00:02:04,420 --> 00:02:08,410 For now, another useful comment that I want to show you is called Nano. 30 00:02:09,220 --> 00:02:11,230 Nano is a text editor. 31 00:02:11,740 --> 00:02:17,980 Once you open a file with Nano, you will be able to write text there or even code if you're creating 32 00:02:17,980 --> 00:02:18,430 a program. 33 00:02:19,000 --> 00:02:20,510 Let me show you how it works. 34 00:02:20,980 --> 00:02:29,110 So if I go to my terminal and I type Nano file two, which is the file that we just created, it will 35 00:02:29,110 --> 00:02:32,640 open a window that looks like this here. 36 00:02:32,680 --> 00:02:34,510 We can write anything we want. 37 00:02:34,540 --> 00:02:37,360 Let's say we want to write Hello World. 38 00:02:38,770 --> 00:02:41,200 How is your day going? 39 00:02:42,130 --> 00:02:43,950 OK, just a simple sentence. 40 00:02:44,320 --> 00:02:49,210 We can save this and then we can see whether we managed to write it using the cat comment. 41 00:02:49,780 --> 00:02:53,750 So to save a file in the nano editor you type control. 42 00:02:53,770 --> 00:02:54,070 OK. 43 00:02:55,000 --> 00:03:03,970 Then once this pops up, you press enter and then you can press control X to exit out of Ed to make 44 00:03:03,970 --> 00:03:06,170 sure that we typed something inside of our file. 45 00:03:06,220 --> 00:03:08,910 If we can catch it like this or cat file too. 46 00:03:09,430 --> 00:03:11,650 And here we have our sentence. 47 00:03:11,690 --> 00:03:12,400 Hello, world. 48 00:03:12,580 --> 00:03:13,750 How is your day going? 49 00:03:14,600 --> 00:03:19,870 OK, but if we try to do the same thing with file one. 50 00:03:21,810 --> 00:03:29,040 It will open this window, but as you can see, it wont work, it will tell us down below that this 51 00:03:29,040 --> 00:03:32,280 file is on writable, as we can see right here. 52 00:03:33,450 --> 00:03:34,180 Why is this? 53 00:03:34,570 --> 00:03:40,980 Well, this is because we don't have enough privileges to change the contents of this file or to write 54 00:03:40,980 --> 00:03:41,950 any new content. 55 00:03:42,310 --> 00:03:45,710 Remember, we created it with pseudo comment. 56 00:03:46,320 --> 00:03:47,910 So how can we write to it? 57 00:03:48,360 --> 00:03:50,980 Well, we can run now with the comment. 58 00:03:51,720 --> 00:03:56,430 Let me show you what if I type pseudo now and then file one. 59 00:03:58,180 --> 00:04:06,840 Now it works, we don't get the error down here and we can also type something like today is Tuesday, 60 00:04:08,350 --> 00:04:09,940 we can save it with control. 61 00:04:09,940 --> 00:04:15,730 Oh, press, enter and then control, exit to exit if we can't find one. 62 00:04:16,300 --> 00:04:19,990 Now, we also have the content written inside of our pseudo. 63 00:04:21,279 --> 00:04:26,220 So this is a way that we can actually create the file that cannot be accessed by a regular user. 64 00:04:26,440 --> 00:04:30,800 You would need pseudo privileges to open and write to that file. 65 00:04:31,670 --> 00:04:36,190 OK, but there is also another command that we can run to elevate our privileges. 66 00:04:36,430 --> 00:04:40,240 And this command is called pseudo s you. 67 00:04:40,660 --> 00:04:48,340 If I type pseudo pursue this comment instead of elevating our privileges for just one single command 68 00:04:48,340 --> 00:04:52,510 that we want to run, this will give us growth account terminal. 69 00:04:53,140 --> 00:04:56,050 As you can see right now, we have Mr. Hacker terminal. 70 00:04:56,500 --> 00:04:58,300 But if we run pseudo you. 71 00:05:00,350 --> 00:05:02,490 Now we get Ruth terminal. 72 00:05:03,050 --> 00:05:10,820 We see it's not really the same, we have Mr. Hacker right here while as here we have Ruth name and 73 00:05:10,820 --> 00:05:12,300 we get this cool call. 74 00:05:12,500 --> 00:05:13,640 I come right here. 75 00:05:14,540 --> 00:05:20,450 But be careful while using root terminal, because with this terminal, you can actually delete any 76 00:05:20,450 --> 00:05:25,790 file that might be crucial for the operating system or you can make any changes whatsoever. 77 00:05:25,880 --> 00:05:27,040 There is no limitation. 78 00:05:27,050 --> 00:05:33,110 You can delete the entire operating system if you want, so only use this one, you know what you're 79 00:05:33,110 --> 00:05:37,030 doing and when there are a lot of commands that you need to run with SUDO. 80 00:05:37,040 --> 00:05:43,430 So in that case, you can open the root terminal and run those comments and then exit out of the terminal. 81 00:05:44,520 --> 00:05:47,730 Now, you might be asking, well, how can I exit once I entered? 82 00:05:47,970 --> 00:05:54,840 Well, it's simple as that, simple as typing exit and we get back Mr. Hacker account. 83 00:05:55,880 --> 00:06:00,500 And let's also mention the last comment for this video, probably the one that you will use more than 84 00:06:00,500 --> 00:06:10,430 any other comment, and that is clear now clear simply does as it says, it clears our terminal window. 85 00:06:11,180 --> 00:06:16,670 Perhaps you ran too many commands and you're looking at a lot of output that you no longer want to read 86 00:06:16,850 --> 00:06:19,030 or you no longer need it at all. 87 00:06:19,490 --> 00:06:26,900 Well, simply by typing clear and pressing enter, we can get rid of all of that and get fresh and clean 88 00:06:26,900 --> 00:06:28,100 terminal window. 89 00:06:29,250 --> 00:06:35,130 Awesome, you're starting to get a hang of this, as you can see, terminal is not that hard to use. 90 00:06:35,460 --> 00:06:40,560 It will take some time for you to get used to these commands, but eventually it will become second 91 00:06:40,560 --> 00:06:41,550 nature for you. 92 00:06:42,160 --> 00:06:45,000 OK, so there's one more video to cover for terminal. 93 00:06:45,150 --> 00:06:52,080 And we're left to cover some other comments aimed at networking and discovering our IP address and so 94 00:06:52,080 --> 00:06:52,730 on and so on. 95 00:06:53,370 --> 00:06:58,920 So practice a little bit with these comments that we already learned in past videos, and I will see 96 00:06:58,920 --> 00:07:00,060 you in the next one.