1 00:00:01,190 --> 00:00:07,100 Okay now that we had the quick overview of the niggs I want to spend some time talking about the lineker's 2 00:00:07,100 --> 00:00:12,210 Terminal so you can access the terminal through this application right here. 3 00:00:12,220 --> 00:00:13,620 So click on that. 4 00:00:13,730 --> 00:00:16,120 It'll open the terminal window for hours. 5 00:00:16,220 --> 00:00:20,890 And as you can see all it is is a blank screen where you can type commands. 6 00:00:22,070 --> 00:00:28,490 Now the lennix Terminal is actually very very powerful because it can be used to do anything that you 7 00:00:28,490 --> 00:00:35,300 can think of really a lot of the applications in the next that have a graphical interface where a command 8 00:00:35,300 --> 00:00:40,440 prompt programs first and then people made a graphical interface for it. 9 00:00:40,700 --> 00:00:46,220 So a lot of the time maybe the graphical interface will be boggie or crash and the terminal program 10 00:00:46,370 --> 00:00:48,040 will still Warwick. 11 00:00:48,380 --> 00:00:53,960 Also a lot of the penetration testing tools do not even have a graphical interface. 12 00:00:53,990 --> 00:00:58,250 A lot of them can only be used through the terminal. 13 00:00:58,400 --> 00:01:06,280 Not only that but in many scenarios you might only have an SS Hage or a command prompt access to a machine. 14 00:01:06,410 --> 00:01:11,810 So you need to know how to use this command prompt in order to achieve your goals. 15 00:01:12,290 --> 00:01:18,170 So throughout the course we're going to be using the terminal a lot and that's why I want to spend some 16 00:01:18,170 --> 00:01:25,280 time just showing you the basic solvent and making sure that we're going to be comfortable using it. 17 00:01:25,280 --> 00:01:28,090 Now the basic idea is you type a command. 18 00:01:28,220 --> 00:01:31,480 And the result will be displayed for you on screen. 19 00:01:31,940 --> 00:01:37,130 So let's have a look on a very very simple command which is P W D. 20 00:01:37,700 --> 00:01:43,510 Now this command Prince the current working directory has the name P W D. 21 00:01:43,610 --> 00:01:50,690 So if I hit enter you can see it's breynton forward slash root which means right now I'm in the rude 22 00:01:50,720 --> 00:01:51,930 directory. 23 00:01:52,040 --> 00:01:56,330 So basically year this is the road it's whole. 24 00:01:57,560 --> 00:02:04,340 So if I do L S which is a command to list all the directories and files in the current were a key directory 25 00:02:04,670 --> 00:02:08,220 we should get all of these directories that we see in here. 26 00:02:09,460 --> 00:02:16,710 So if I had an error as you can see I can see all these directories in the current or a king the rectory. 27 00:02:17,110 --> 00:02:25,430 Now another very useful command is dcg command this command allow us to navigate in to another directory. 28 00:02:25,660 --> 00:02:30,510 So for example let's say I want to navigate into the downloads. 29 00:02:30,520 --> 00:02:37,680 All we have to do is type C followed by the name of the directory that I want to navigate to. 30 00:02:37,690 --> 00:02:39,480 So I'm going to type downloads. 31 00:02:41,100 --> 00:02:42,520 Now if I hit enter. 32 00:02:43,320 --> 00:02:45,640 I should be inside the downloads now. 33 00:02:45,780 --> 00:02:49,520 So why do pwo need to see my current working directory. 34 00:02:49,620 --> 00:02:56,260 You'll see that it's seen in rude forward slash downloads so I do s here. 35 00:02:56,340 --> 00:03:00,420 It should show me all the directories and files inside downloads. 36 00:03:00,480 --> 00:03:05,720 Self I do and to as you can see I have a directory and the file in here. 37 00:03:05,910 --> 00:03:10,520 And these are the exact same files that you'll see if you double click the downloads here. 38 00:03:12,660 --> 00:03:19,710 Now if you want to go back one directory so similar to press and the back button in here all you have 39 00:03:19,710 --> 00:03:26,070 to do is to see the again the command to change the working directly followed by dot dot. 40 00:03:26,640 --> 00:03:33,570 And now I do peel them lewdly you'll see and back in rude and if I do else you'll see all the directories 41 00:03:33,570 --> 00:03:34,930 and files and Root. 42 00:03:36,000 --> 00:03:37,880 So that's all good. 43 00:03:38,020 --> 00:03:41,850 And there is actually a huge number of commands that you can use. 44 00:03:41,970 --> 00:03:46,130 So go wanted to include a link in the resources of this lecture. 45 00:03:46,230 --> 00:03:48,920 Of all the Linux compilers that you can use. 46 00:03:49,050 --> 00:03:50,880 You don't need to know them by heart. 47 00:03:50,880 --> 00:03:53,560 We're actually going to be in a lot of them throughout the course. 48 00:03:53,600 --> 00:03:58,880 So you are going to naturally learn them as you go through the chorus. 49 00:03:59,040 --> 00:04:04,650 Now if you are using a command and you're not sure about how this command warrick's you can just use 50 00:04:04,680 --> 00:04:09,560 the mind command to display the manual of this command. 51 00:04:09,630 --> 00:04:14,610 For example we've used the Ellis command here to list the files and directories in the current working 52 00:04:14,610 --> 00:04:15,630 directory. 53 00:04:15,780 --> 00:04:23,520 But if I do mine followed by Elias this may simply means I am requesting the manual of less. 54 00:04:23,520 --> 00:04:26,950 So I'm asking how can I use the l s command. 55 00:04:27,180 --> 00:04:34,650 So if I had Enter you'll see I'll get a screen similar to a text file and basically it's given me a 56 00:04:34,650 --> 00:04:41,430 lot of information on how to use the Ellis command so you can see that it's telling us that this command 57 00:04:41,520 --> 00:04:44,020 will list the directory contents. 58 00:04:44,020 --> 00:04:48,830 I guess the way to where X by type in l s followed by the options followed by a file. 59 00:04:48,840 --> 00:04:56,200 If you if you want to run it on a file you can see a longer description of the command. 60 00:04:57,310 --> 00:05:03,800 And then you can see all the options and the arguments that we can use with this command. 61 00:05:04,940 --> 00:05:06,230 Now Ellen. 62 00:05:06,280 --> 00:05:10,520 Most of the time the options will always follow the same syntax. 63 00:05:10,540 --> 00:05:18,430 So either you die Dyche letter or a dash dash a word to specify the argument for example and hear the 64 00:05:18,430 --> 00:05:24,950 dash a dash dash all will ignore entries starting with it. 65 00:05:25,240 --> 00:05:31,570 So if you keep going down in here you'll see all the options and arguments you can use with the l s 66 00:05:31,570 --> 00:05:40,450 command and we have another example here we have the dash L which means it's going to use a longer listing 67 00:05:40,450 --> 00:05:46,580 format which will display more information about the files in the current working directory. 68 00:05:46,960 --> 00:05:48,150 So let's have a look at that. 69 00:05:48,160 --> 00:05:53,560 I'm going to press queue to exit this and then we're going to do Elyse as usual. 70 00:05:53,560 --> 00:06:00,550 And since we read the manual we know we can do dash L to see more information about the files and if 71 00:06:00,550 --> 00:06:06,790 I hit enter now you can see I'm still getting the same directories but it's also shown me the permissions 72 00:06:06,790 --> 00:06:11,140 of the user as the data created and so on. 73 00:06:11,290 --> 00:06:18,530 So you can use the man command on any command you are not on on the Elias so you can use it on the pwt 74 00:06:18,850 --> 00:06:26,110 you can use it on this PDA or any other command and it'll show you full description or the manual page 75 00:06:26,380 --> 00:06:28,720 of how to use this command. 76 00:06:30,140 --> 00:06:33,600 Now I'm glad to clear this screen by type in clear. 77 00:06:35,080 --> 00:06:38,810 And the next thing that I want to show you is the dash dash help. 78 00:06:38,920 --> 00:06:45,460 So this is something that you can use again in almost all commands and all programs in Linux so you 79 00:06:45,460 --> 00:06:51,200 can just type the program name or add the command name followed by the dash help. 80 00:06:52,720 --> 00:06:56,150 As you may think this will show you help message. 81 00:06:56,200 --> 00:06:58,040 Tell you what this command is. 82 00:06:58,060 --> 00:06:59,480 What this program is. 83 00:06:59,500 --> 00:07:05,330 The arguments that it takes how to use these arguments and examples at the bottom. 84 00:07:06,450 --> 00:07:11,840 Now another useful thing with the Terim And also I'm going to cure this again is the arrows so you can 85 00:07:11,840 --> 00:07:18,470 press up to go up to see all the commands that we executed before and again you can go down to see to 86 00:07:18,470 --> 00:07:23,660 navigate between the commands that you executed previously. 87 00:07:23,720 --> 00:07:27,050 You can also use the tab for autocomplete. 88 00:07:27,320 --> 00:07:34,520 So again let's do this and you can see all the files and let's say we want to go into documents so we 89 00:07:34,520 --> 00:07:37,190 can do Cedi followed by documents. 90 00:07:37,220 --> 00:07:42,020 You can type documents or if you're lazy like me you can just do. 91 00:07:42,040 --> 00:07:44,480 Do you always see and press tab. 92 00:07:44,810 --> 00:07:49,770 And as you can see it's automatically complete in the rest of the world for me. 93 00:07:50,600 --> 00:07:56,710 So this is something that comes very very handy when you using the terminal for a long time. 94 00:07:57,020 --> 00:08:03,230 Now what I also want to show you is how to install programs in Cali from the terminal. 95 00:08:03,230 --> 00:08:08,750 So first I'm going to clear this and the first thing that you want to do is update the sources where 96 00:08:08,750 --> 00:08:13,280 akali can search and download programs from. 97 00:08:13,280 --> 00:08:16,870 So were going to do it dead of date. 98 00:08:17,830 --> 00:08:24,590 No good is the name of the application that allow us to download and install programs and were seeing 99 00:08:24,590 --> 00:08:25,370 an update. 100 00:08:25,380 --> 00:08:32,070 Because I'm saying that I want you to update the list of all the programs that I can install so I'm 101 00:08:32,070 --> 00:08:38,110 going to hit enter and you make sure that you have internet connection when running this and as a guess 102 00:08:38,120 --> 00:08:45,020 you still and me that it's done and now we can go ahead and start install and applications. 103 00:08:45,210 --> 00:08:51,580 So the first program that I want to install is actually a terminal program so similar to this one. 104 00:08:51,690 --> 00:08:57,870 What it allows us to have multiple terminal windows open in the same window. 105 00:08:58,290 --> 00:09:04,740 So in order to install a program through the command line we are going to do it GED which is again the 106 00:09:04,740 --> 00:09:09,610 name of the program that allow us to install programs on the system. 107 00:09:09,700 --> 00:09:16,850 We're going to say that I want to install and the program that I want to install is called Terminator. 108 00:09:18,590 --> 00:09:20,270 So very very simple. 109 00:09:20,270 --> 00:09:26,090 First of all were Type in the name of the command which is Abd get were saying that I want to install 110 00:09:26,660 --> 00:09:30,920 the program name that I want to install is called Terminator. 111 00:09:30,920 --> 00:09:32,220 So I'm going to hit enter. 112 00:09:33,880 --> 00:09:40,300 And this is go to download and install Terminator for me so you can use the same command to install 113 00:09:40,360 --> 00:09:42,010 any program that you want. 114 00:09:42,040 --> 00:09:47,300 You just need to replace Terminator with the name of the program that you want to install. 115 00:09:48,290 --> 00:09:53,610 Now I've already downloaded and installed this before so it didn't ask me to confirm. 116 00:09:53,780 --> 00:09:59,570 But if you're running this for the first time it might ask you to confirm whether or not you actually 117 00:09:59,570 --> 00:10:01,330 want to install this program. 118 00:10:01,400 --> 00:10:05,520 So all you have to do is press y from the keyboard and hit enter. 119 00:10:06,220 --> 00:10:08,020 Now as you can see it's done. 120 00:10:08,260 --> 00:10:11,600 So if I go to my all obligations in here. 121 00:10:12,940 --> 00:10:15,700 And just type Terminator. 122 00:10:15,700 --> 00:10:17,570 You can see that I have it here. 123 00:10:18,130 --> 00:10:24,940 So I'm actually going to drag it and put it in my dark so I can access it easily in the future. 124 00:10:26,750 --> 00:10:32,490 So now I can just click it in here and that'll open Terminator for me. 125 00:10:32,510 --> 00:10:36,320 Now this is another application that allow me to run commands. 126 00:10:36,320 --> 00:10:38,980 So it's exactly the same as this. 127 00:10:38,990 --> 00:10:42,440 So again I can do el'ad send Pete w.d.. 128 00:10:42,500 --> 00:10:48,920 The only difference is with this one I can actually right click and click or split horizontally for 129 00:10:48,920 --> 00:10:50,240 example. 130 00:10:50,750 --> 00:10:57,350 And this will split the same screen into two screens where I can run commands at the same time so I 131 00:10:57,350 --> 00:11:01,210 can have some commands in here and I can run commands in here. 132 00:11:02,380 --> 00:11:10,180 And then I can even split this more if I want again vertically or horizontally as you can see I can 133 00:11:10,180 --> 00:11:16,120 have as many terminal windows as I want and this will be very helpful in the future when it will be 134 00:11:16,120 --> 00:11:20,340 running a number of programs in a number of commands at the same time.