WEBVTT

00:01.190 --> 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

00:07.100 --> 00:12.210
Terminal so you can access the terminal through this application right here.

00:12.220 --> 00:13.620
So click on that.

00:13.730 --> 00:16.120
It'll open the terminal window for hours.

00:16.220 --> 00:20.890
And as you can see all it is is a blank screen where you can type commands.

00:22.070 --> 00:28.490
Now the lennix Terminal is actually very very powerful because it can be used to do anything that you

00:28.490 --> 00:35.300
can think of really a lot of the applications in the next that have a graphical interface where a command

00:35.300 --> 00:40.440
prompt programs first and then people made a graphical interface for it.

00:40.700 --> 00:46.220
So a lot of the time maybe the graphical interface will be boggie or crash and the terminal program

00:46.370 --> 00:48.040
will still Warwick.

00:48.380 --> 00:53.960
Also a lot of the penetration testing tools do not even have a graphical interface.

00:53.990 --> 00:58.250
A lot of them can only be used through the terminal.

00:58.400 --> 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.

01:06.410 --> 01:11.810
So you need to know how to use this command prompt in order to achieve your goals.

01:12.290 --> 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

01:18.170 --> 01:25.280
time just showing you the basic solvent and making sure that we're going to be comfortable using it.

01:25.280 --> 01:28.090
Now the basic idea is you type a command.

01:28.220 --> 01:31.480
And the result will be displayed for you on screen.

01:31.940 --> 01:37.130
So let's have a look on a very very simple command which is P W D.

01:37.700 --> 01:43.510
Now this command Prince the current working directory has the name P W D.

01:43.610 --> 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

01:50.720 --> 01:51.930
directory.

01:52.040 --> 01:56.330
So basically year this is the road it's whole.

01:57.560 --> 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

02:04.670 --> 02:08.220
we should get all of these directories that we see in here.

02:09.460 --> 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.

02:17.110 --> 02:25.430
Now another very useful command is dcg command this command allow us to navigate in to another directory.

02:25.660 --> 02:30.510
So for example let's say I want to navigate into the downloads.

02:30.520 --> 02:37.680
All we have to do is type C followed by the name of the directory that I want to navigate to.

02:37.690 --> 02:39.480
So I'm going to type downloads.

02:41.100 --> 02:42.520
Now if I hit enter.

02:43.320 --> 02:45.640
I should be inside the downloads now.

02:45.780 --> 02:49.520
So why do pwo need to see my current working directory.

02:49.620 --> 02:56.260
You'll see that it's seen in rude forward slash downloads so I do s here.

02:56.340 --> 03:00.420
It should show me all the directories and files inside downloads.

03:00.480 --> 03:05.720
Self I do and to as you can see I have a directory and the file in here.

03:05.910 --> 03:10.520
And these are the exact same files that you'll see if you double click the downloads here.

03:12.660 --> 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

03:19.710 --> 03:26.070
to do is to see the again the command to change the working directly followed by dot dot.

03:26.640 --> 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

03:33.570 --> 03:34.930
and files and Root.

03:36.000 --> 03:37.880
So that's all good.

03:38.020 --> 03:41.850
And there is actually a huge number of commands that you can use.

03:41.970 --> 03:46.130
So go wanted to include a link in the resources of this lecture.

03:46.230 --> 03:48.920
Of all the Linux compilers that you can use.

03:49.050 --> 03:50.880
You don't need to know them by heart.

03:50.880 --> 03:53.560
We're actually going to be in a lot of them throughout the course.

03:53.600 --> 03:58.880
So you are going to naturally learn them as you go through the chorus.

03:59.040 --> 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

04:04.680 --> 04:09.560
the mind command to display the manual of this command.

04:09.630 --> 04:14.610
For example we've used the Ellis command here to list the files and directories in the current working

04:14.610 --> 04:15.630
directory.

04:15.780 --> 04:23.520
But if I do mine followed by Elias this may simply means I am requesting the manual of less.

04:23.520 --> 04:26.950
So I'm asking how can I use the l s command.

04:27.180 --> 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

04:34.650 --> 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

04:41.520 --> 04:44.020
will list the directory contents.

04:44.020 --> 04:48.830
I guess the way to where X by type in l s followed by the options followed by a file.

04:48.840 --> 04:56.200
If you if you want to run it on a file you can see a longer description of the command.

04:57.310 --> 05:03.800
And then you can see all the options and the arguments that we can use with this command.

05:04.940 --> 05:06.230
Now Ellen.

05:06.280 --> 05:10.520
Most of the time the options will always follow the same syntax.

05:10.540 --> 05:18.430
So either you die Dyche letter or a dash dash a word to specify the argument for example and hear the

05:18.430 --> 05:24.950
dash a dash dash all will ignore entries starting with it.

05:25.240 --> 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

05:31.570 --> 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

05:40.450 --> 05:46.580
format which will display more information about the files in the current working directory.

05:46.960 --> 05:48.150
So let's have a look at that.

05:48.160 --> 05:53.560
I'm going to press queue to exit this and then we're going to do Elyse as usual.

05:53.560 --> 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

06:00.550 --> 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

06:06.790 --> 06:11.140
of the user as the data created and so on.

06:11.290 --> 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

06:18.850 --> 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

06:26.380 --> 06:28.720
of how to use this command.

06:30.140 --> 06:33.600
Now I'm glad to clear this screen by type in clear.

06:35.080 --> 06:38.810
And the next thing that I want to show you is the dash dash help.

06:38.920 --> 06:45.460
So this is something that you can use again in almost all commands and all programs in Linux so you

06:45.460 --> 06:51.200
can just type the program name or add the command name followed by the dash help.

06:52.720 --> 06:56.150
As you may think this will show you help message.

06:56.200 --> 06:58.040
Tell you what this command is.

06:58.060 --> 06:59.480
What this program is.

06:59.500 --> 07:05.330
The arguments that it takes how to use these arguments and examples at the bottom.

07:06.450 --> 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

07:11.840 --> 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

07:18.470 --> 07:23.660
navigate between the commands that you executed previously.

07:23.720 --> 07:27.050
You can also use the tab for autocomplete.

07:27.320 --> 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

07:34.520 --> 07:37.190
can do Cedi followed by documents.

07:37.220 --> 07:42.020
You can type documents or if you're lazy like me you can just do.

07:42.040 --> 07:44.480
Do you always see and press tab.

07:44.810 --> 07:49.770
And as you can see it's automatically complete in the rest of the world for me.

07:50.600 --> 07:56.710
So this is something that comes very very handy when you using the terminal for a long time.

07:57.020 --> 08:03.230
Now what I also want to show you is how to install programs in Cali from the terminal.

08:03.230 --> 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

08:08.750 --> 08:13.280
akali can search and download programs from.

08:13.280 --> 08:16.870
So were going to do it dead of date.

08:17.830 --> 08:24.590
No good is the name of the application that allow us to download and install programs and were seeing

08:24.590 --> 08:25.370
an update.

08:25.380 --> 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

08:32.070 --> 08:38.110
going to hit enter and you make sure that you have internet connection when running this and as a guess

08:38.120 --> 08:45.020
you still and me that it's done and now we can go ahead and start install and applications.

08:45.210 --> 08:51.580
So the first program that I want to install is actually a terminal program so similar to this one.

08:51.690 --> 08:57.870
What it allows us to have multiple terminal windows open in the same window.

08:58.290 --> 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

09:04.740 --> 09:09.610
name of the program that allow us to install programs on the system.

09:09.700 --> 09:16.850
We're going to say that I want to install and the program that I want to install is called Terminator.

09:18.590 --> 09:20.270
So very very simple.

09:20.270 --> 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

09:26.660 --> 09:30.920
the program name that I want to install is called Terminator.

09:30.920 --> 09:32.220
So I'm going to hit enter.

09:33.880 --> 09:40.300
And this is go to download and install Terminator for me so you can use the same command to install

09:40.360 --> 09:42.010
any program that you want.

09:42.040 --> 09:47.300
You just need to replace Terminator with the name of the program that you want to install.

09:48.290 --> 09:53.610
Now I've already downloaded and installed this before so it didn't ask me to confirm.

09:53.780 --> 09:59.570
But if you're running this for the first time it might ask you to confirm whether or not you actually

09:59.570 --> 10:01.330
want to install this program.

10:01.400 --> 10:05.520
So all you have to do is press y from the keyboard and hit enter.

10:06.220 --> 10:08.020
Now as you can see it's done.

10:08.260 --> 10:11.600
So if I go to my all obligations in here.

10:12.940 --> 10:15.700
And just type Terminator.

10:15.700 --> 10:17.570
You can see that I have it here.

10:18.130 --> 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.

10:26.750 --> 10:32.490
So now I can just click it in here and that'll open Terminator for me.

10:32.510 --> 10:36.320
Now this is another application that allow me to run commands.

10:36.320 --> 10:38.980
So it's exactly the same as this.

10:38.990 --> 10:42.440
So again I can do el'ad send Pete w.d..

10:42.500 --> 10:48.920
The only difference is with this one I can actually right click and click or split horizontally for

10:48.920 --> 10:50.240
example.

10:50.750 --> 10:57.350
And this will split the same screen into two screens where I can run commands at the same time so I

10:57.350 --> 11:01.210
can have some commands in here and I can run commands in here.

11:02.380 --> 11:10.180
And then I can even split this more if I want again vertically or horizontally as you can see I can

11:10.180 --> 11:16.120
have as many terminal windows as I want and this will be very helpful in the future when it will be

11:16.120 --> 11:20.340
running a number of programs in a number of commands at the same time.
