WEBVTT

00:00.390 --> 00:00.960
Okay.

00:01.140 --> 00:05.970
Now let's dig into the next usage and explore some basic Linux command.

00:07.060 --> 00:07.990
Now from here.

00:08.190 --> 00:09.280
Open the terminal.

00:10.120 --> 00:11.050
Now, from here.

00:11.050 --> 00:14.590
If I go to the file preferences, go to the color scheme.

00:14.590 --> 00:17.500
Here, you can change it to something else as you want.

00:18.010 --> 00:20.020
Actually, I prefer green on black.

00:20.050 --> 00:24.820
Now, not to sound like hair color, to be honest, but actually it's better for my eyes.

00:24.820 --> 00:26.260
So if I click here.

00:26.260 --> 00:28.120
Yeah, you can see that now.

00:28.120 --> 00:28.870
It is better.

00:29.050 --> 00:34.840
All right, actually, let's increase the font size control, shift the plus sign.

00:35.740 --> 00:37.630
So, yeah, I think this is better.

00:37.870 --> 00:40.880
It's increased this and this it.

00:41.860 --> 00:47.830
Now the first command, it will be Alice, as it is the command used for listing the file.

00:47.830 --> 00:56.650
So as you can see less and here all the files or directories I have on the current path so as to list

00:56.650 --> 00:57.280
commands.

00:58.240 --> 00:59.820
So I'll ask the list fight.

01:00.150 --> 01:00.640
Okay.

01:00.970 --> 01:02.980
Now we have clear.

01:03.070 --> 01:06.160
So you can see that if I type enter.

01:06.160 --> 01:11.170
And as you can see now, you can see that the screen is becoming chaotic.

01:11.200 --> 01:13.950
So to clear the screen, we will put the clear command.

01:13.960 --> 01:15.260
Clear, as simple as that.

01:15.430 --> 01:15.930
Okay.

01:15.940 --> 01:18.370
So we learned less and clear.

01:18.700 --> 01:19.280
Okay.

01:19.300 --> 01:23.250
Now, what if I want to learn more about specific command?

01:23.270 --> 01:30.550
So for example, the last command, I want to read more about it, about its option, about its features,

01:30.550 --> 01:31.030
whatever.

01:31.150 --> 01:33.980
So we will use the main command.

01:34.000 --> 01:37.000
The main command is used to, for many, one.

01:37.390 --> 01:38.980
So man less.

01:41.300 --> 01:44.700
It will show us what is the LZ command will do.

01:44.720 --> 01:48.090
So let's directory contents as you can see, LZ.

01:48.110 --> 01:52.070
This is the syntax or synopsis plus option.

01:52.070 --> 01:54.980
Whatever options, then the file, whatever file.

01:55.250 --> 02:03.500
So you can see that we have a lot of descriptions dash a, all the P, C, F or T and you can read more

02:03.500 --> 02:05.600
about it as you can see from here.

02:06.550 --> 02:07.600
Now to quit from this.

02:07.600 --> 02:10.240
You can see that for help or for quit.

02:10.240 --> 02:11.310
So let's quit.

02:11.320 --> 02:11.890
All right.

02:11.890 --> 02:15.700
So men clear, as you can see.

02:15.730 --> 02:17.260
Clear the terminal screen.

02:17.440 --> 02:22.090
And it has a lot of options that T type V, X, whatever.

02:22.720 --> 02:26.020
Q to quit now, man, man.

02:26.050 --> 02:29.050
So this is to show the manual for the manual page.

02:29.140 --> 02:29.620
Okay.

02:29.650 --> 02:33.790
So this is man, this is an interface to the system reference manual.

02:34.120 --> 02:40.800
So you can see that it has dash k, dash k, capital dash FLW options, right?

02:41.200 --> 02:42.130
All right, cool.

02:42.130 --> 02:43.600
So far so good.

02:44.320 --> 02:49.600
Okay, now if I type less, you can see that I am here currently.

02:49.810 --> 02:51.940
I want to know where I am currently.

02:51.940 --> 02:59.440
So if I type b w dx which is print working directory, it will show us that I am inside the home slash

02:59.440 --> 03:00.070
kelly.

03:00.490 --> 03:09.130
Okay, so if I type man P.W. De here, you can see that it will bring the name of the current working

03:09.130 --> 03:10.000
directory.

03:10.030 --> 03:10.240
Okay.

03:10.330 --> 03:16.390
So Brent working directory or the current directory and it has a lot of options like Dash L, Dash P,

03:16.390 --> 03:16.960
whatever.

03:16.960 --> 03:18.190
You can read more about it.

03:18.700 --> 03:20.260
Now let's clear the screen again.

03:20.530 --> 03:26.980
And now if I type ls you can see that I am here inside the home.

03:26.980 --> 03:33.940
Kelly When I typed BW D OC the Kelly Home Directory, now I want to go to the desktop OC where it is

03:33.940 --> 03:34.300
here.

03:34.300 --> 03:36.250
OC how to do such a thing.

03:36.250 --> 03:39.520
I would use the CD Command Man CD again.

03:41.340 --> 03:45.720
You can see that some of the comments are not or don't have manual.

03:45.720 --> 03:51.510
So like the CD because it's a simple command so it has not so CD.

03:51.750 --> 03:53.430
Then the name of the directory.

03:53.760 --> 03:56.070
So if I type, unless I want to go to the desktop.

03:56.120 --> 03:56.660
Okay.

03:56.670 --> 03:59.490
But remember in Linux, this is a case sensitive.

03:59.730 --> 04:03.150
So CD desktop, the D must be capital.

04:03.450 --> 04:09.220
Now you can notice that if I type desktop, I can press the tab button.

04:09.240 --> 04:15.840
So if I press it, it will autocomplete the sentence or the name of the folder or directory in Linux

04:15.840 --> 04:17.520
we call the directory not folder.

04:17.550 --> 04:19.350
In Windows we call this folder.

04:19.950 --> 04:21.420
So CD desktop.

04:21.450 --> 04:22.710
Now you can see that.

04:22.740 --> 04:23.400
Yeah.

04:23.400 --> 04:25.590
From here from tilde mark.

04:25.890 --> 04:32.970
It changed to the desktop by the way, the tilde marking the tilde mark here means it is the home directory

04:32.970 --> 04:36.120
of the current user, which is in our case it is the carrier user.

04:37.410 --> 04:38.040
No worries.

04:38.040 --> 04:40.410
We will talk about this in details later on.

04:40.410 --> 04:41.700
But for now, follow me.

04:42.900 --> 04:43.200
Okay.

04:43.230 --> 04:48.010
Now, if I want to go back, I will go see the dot dot OC.

04:48.270 --> 04:51.060
Now dot dot means the parent directory.

04:51.390 --> 04:53.620
Again, we will talk about this later on.

04:53.640 --> 04:54.450
No worries.

04:55.230 --> 05:00.990
So here we will go back to the parent directory of the desktop and the parent director of the desktop

05:00.990 --> 05:04.410
is the home directory of Linux user.

05:05.280 --> 05:05.970
Okay.

05:06.000 --> 05:07.040
Now, here.

05:07.050 --> 05:09.750
What if I want to make a new directory?

05:09.750 --> 05:13.200
I will use the command and data or make directory.

05:13.200 --> 05:20.250
So man, make that and see this is to make directory and we have other options as you can see here.

05:20.640 --> 05:23.850
So make dial and let's name a list.

05:24.540 --> 05:28.050
And as you can see here it is test.

05:28.380 --> 05:29.940
So seed to test.

05:30.210 --> 05:33.330
You can see now we are inside the test directory.

05:33.330 --> 05:35.190
Okay, so far so good.

05:35.220 --> 05:39.220
Now, you may ask me, this directory is empty.

05:39.240 --> 05:42.840
How did we go to the dot or to the dot?

05:42.870 --> 05:45.630
There is other thing called that, which is the current directory.

05:45.630 --> 05:46.860
How did we go there?

05:46.860 --> 05:48.240
It is not even exist.

05:48.240 --> 05:49.890
No, actually it is exist.

05:49.890 --> 05:51.090
But it is hidden.

05:51.090 --> 05:56.790
So if I type ls dash a this will show all the directory.

05:56.790 --> 05:58.260
So how did I know that?

05:58.260 --> 06:03.120
Just open the manually, page and press don't ignore entries.

06:03.120 --> 06:10.410
Start with dot as you can see because the dot here in Linux it will be considered a hidden directory

06:10.440 --> 06:12.240
OC or hidden files.

06:12.990 --> 06:20.430
So when I type, it will not be shown, but it will show everything which is dot and dot dot the dot

06:20.430 --> 06:25.050
here one single dot, which is the current directory which is the test directory.

06:25.710 --> 06:29.300
Now you may ask me, but what is the use for this?

06:29.310 --> 06:31.470
This is has this has no meaning.

06:31.470 --> 06:31.740
No.

06:31.740 --> 06:32.970
We will talk about it later on.

06:32.970 --> 06:33.690
No worries.

06:33.780 --> 06:38.910
And the dot dot, which means the parent directory of the current directory, which is the parent directory

06:38.910 --> 06:41.460
of test, which is in our case, the tilde.

06:42.480 --> 06:48.360
And we already mentioned that this means the home directory of the current user, which is clearly user,

06:48.360 --> 06:50.400
which is the Cally home page.

06:50.400 --> 06:52.040
So said dot dot.

06:52.650 --> 06:56.700
It will go to the parent directory and you can see we returned back.

06:56.880 --> 06:57.450
All right.

06:57.750 --> 06:59.040
So far, so good.

06:59.580 --> 07:00.930
Now let's clear the screen.

07:01.200 --> 07:04.860
Now, also, there is other options like dash p.

07:05.850 --> 07:07.820
Which means create a parent directory.

07:07.830 --> 07:10.920
So, for example, I have this here, right?

07:11.370 --> 07:18.630
So what if I want to create this tool, as you can see and inside it, I want to create a list three

07:18.810 --> 07:19.470
like this.

07:19.470 --> 07:23.130
This will not work because this tool is not exist in the first place.

07:23.130 --> 07:29.670
So for that case I will put the P, which is parent and this will create this tool.

07:30.060 --> 07:36.630
As you can see if I type ls this tool with directory it will show us the content or the yeah.

07:36.630 --> 07:41.820
The content of this tool which is history, the folder we have created.

07:41.820 --> 07:45.450
Now let's talk about another command which is the wish command.

07:45.450 --> 07:50.520
This is to search through the directories that are defined in the bath environment.

07:50.760 --> 07:55.440
So if I tap echo, this is a command used to print a text.

07:55.440 --> 07:58.260
So if I type eco hi, it will print hi.

07:58.260 --> 07:59.850
As you can see in double quotation.

08:00.090 --> 08:03.150
If I type eco hi.

08:03.390 --> 08:04.650
Also it will print it.

08:04.650 --> 08:05.850
But if I type.

08:06.640 --> 08:07.390
Echo.

08:08.220 --> 08:08.690
Shift.

08:08.880 --> 08:09.540
Hi.

08:09.570 --> 08:18.450
Now you can see that the shift for the dollar sign means that this is a variable in Linux and this variable

08:18.450 --> 08:19.370
is not assigned.

08:19.380 --> 08:24.190
But we have environment variables called the best here.

08:24.360 --> 08:26.100
So if I type it, it will see.

08:26.100 --> 08:32.160
You can see that this variable contains a listing of directories that can be search when a command is

08:32.160 --> 08:34.020
issued without its bath.

08:34.170 --> 08:36.690
By the way, this is not in Linux only.

08:36.690 --> 08:39.990
This is used with Debian or Linux generally.

08:40.320 --> 08:44.550
So Debian based or IT based or whatever.

08:44.550 --> 08:46.230
Linux distribution.

08:46.980 --> 08:50.900
Well, some of them doesn't use this or have a special meaning, whatever.

08:51.300 --> 08:56.490
But I'm talking about the popular or the popular distribution anyway.

08:56.790 --> 09:01.480
So if I type ls here, you can see this is a command, by the way.

09:01.500 --> 09:08.390
By the way, this is a utility that exists on the system that should be inside here.

09:08.400 --> 09:16.650
So if I type eco path, it should be either here, use a local spin or use a local bin or user a spin

09:16.650 --> 09:17.440
or whatever.

09:17.470 --> 09:17.710
Okay.

09:17.730 --> 09:20.550
So it must be inside one of these directories.

09:20.670 --> 09:28.050
So if I type which by the way man which we learn that which locate a command as you can see, it will

09:28.050 --> 09:29.280
look at the command where it is.

09:29.280 --> 09:30.990
So which ls.

09:32.350 --> 09:39.360
As you can see SE is easiest to lose dash color or which CD.

09:39.570 --> 09:42.680
You can see that these are a built in commands.

09:43.200 --> 09:45.180
So let's look about another command.

09:45.180 --> 09:53.910
So for example, which python button is a command and you can see it is inside the user bin button here

09:54.030 --> 09:55.230
where it is located.

09:55.230 --> 09:59.330
So I'm using which command, by the way, the CD and LZ.

09:59.340 --> 10:00.630
These are a built in command.

10:00.630 --> 10:06.330
So most likely they are not existed anywhere or they are existed, actually.

10:06.330 --> 10:07.930
But we will talk about these later on.

10:07.930 --> 10:08.550
No worries.

10:08.910 --> 10:13.650
Now we have another command called Locate Man, Locate like this.

10:13.740 --> 10:16.130
This is to find files by name quickly.

10:17.070 --> 10:21.420
So as you can see in which to read the database made by update DB.

10:21.450 --> 10:24.810
So for example, locate python.

10:25.350 --> 10:29.690
You can see it will start looking for all or anything called Python.

10:29.700 --> 10:33.030
As you can see now this list to be updated.

10:33.030 --> 10:36.570
We must use this command update db.

10:37.960 --> 10:39.540
Like this, so press it.

10:39.550 --> 10:45.580
You can see permission denied for that case because after all, I'm updating the whole system or I'm

10:45.580 --> 10:48.580
updating the database from the whole system.

10:48.580 --> 10:50.840
So I must use the sudo command.

10:50.860 --> 10:51.430
No worries.

10:51.430 --> 10:57.550
We will talk about this later on the the command, by the way, if I type man sudo this is to execute

10:57.550 --> 10:58.930
a command as another user.

10:58.930 --> 11:02.770
So sudo update db.

11:04.690 --> 11:06.460
And here it will ask for a password.

11:06.670 --> 11:07.450
Of course.

11:08.360 --> 11:09.020
Which is catty.

11:09.020 --> 11:10.630
One, two, three, four, five, six.

11:10.640 --> 11:13.760
By the way, this is a stupid password.

11:14.060 --> 11:17.300
But anyway, this is just for the sake of discourse.

11:17.450 --> 11:22.010
Now we updated the database, so look it again by phone.

11:22.520 --> 11:24.530
And sorry, I mistake this.

11:24.530 --> 11:25.180
I have a mistake.

11:25.220 --> 11:28.810
Yeah, it will show us the same result.

11:29.030 --> 11:29.570
By the way.

11:30.460 --> 11:31.000
Okay.

11:31.890 --> 11:33.990
Now finally we have another command.

11:33.990 --> 11:38.040
I know we took a lot of time, but these are just the basics.

11:38.070 --> 11:38.850
No worries.

11:38.850 --> 11:45.600
We will have what we learned practically step by step, and we will repeat it over and over.

11:45.600 --> 11:48.730
So you will get used to it and you will master it in no time.

11:48.750 --> 11:49.470
Trust me.

11:49.560 --> 11:51.420
Now, finally, we have that find command.

11:51.420 --> 11:52.650
So men find.

11:53.520 --> 11:56.240
This is to search for file in directory or hierarchical.

11:56.250 --> 11:59.840
So for example, find slash.

11:59.850 --> 12:07.380
This is where we want to search the name and the name which will be by phone, for example.

12:08.500 --> 12:11.140
But you can see that it will start showing us permission denied.

12:11.140 --> 12:12.100
Permission denied.

12:12.130 --> 12:12.790
All right.

12:12.790 --> 12:15.520
So we learned that we already learned what we do.

12:15.550 --> 12:16.490
What should we do?

12:16.510 --> 12:20.050
Which is using the pseudo, as you can see.

12:20.840 --> 12:23.180
It will show us that it found some.

12:23.180 --> 12:27.150
But here we got permission denied for this for some reason.

12:27.170 --> 12:29.640
For now, we will not handle it because this is a low level.

12:29.660 --> 12:31.250
We will talk about it later on.

12:32.420 --> 12:32.740
Okay.

12:32.750 --> 12:34.820
So we found what we want.

12:34.850 --> 12:36.140
All right, cool.

12:36.170 --> 12:37.430
So far, so good.

12:37.460 --> 12:40.640
Now I will provide you with exercises.

12:41.560 --> 12:44.390
On what we have learnt here in this lecture.

12:44.410 --> 12:46.440
So you will practice with me.

12:47.380 --> 12:53.080
Now I recommend you to do the exercises because it will be very useful for you.

12:53.290 --> 12:56.710
As they say, practice makes perfect.
