WEBVTT

00:00.080 --> 00:03.500
So far you have seen a bunch of comments that you will use very often.

00:03.500 --> 00:08.120
So those are really the core comments that you really need to get started with the terminal.

00:08.150 --> 00:10.340
Now I want to show you a few more comments.

00:10.340 --> 00:15.830
So not just to show you whatever comments, but those are actually quite useful, especially for the

00:15.830 --> 00:16.580
Raspberry Pi.

00:16.610 --> 00:20.240
So first of all, well this you have seen it already several times.

00:20.240 --> 00:22.070
You can clear the terminal like this.

00:22.070 --> 00:23.060
It's quite useful.

00:23.090 --> 00:27.530
Now there is one command that you can use to get the IP address of your Raspberry Pi.

00:27.560 --> 00:30.860
So provided that you are already actually on the Raspberry Pi.

00:30.890 --> 00:33.380
Okay, so this one is hostname.

00:33.440 --> 00:36.140
And then dash I uppercase.

00:36.500 --> 00:41.810
Make sure the I is uppercase I press enter and you can see this is my current IP address.

00:41.810 --> 00:46.970
So this is the one that I have put on the VNC client to connect to the Raspberry Pi.

00:46.970 --> 00:50.840
And well if you have access to the desktop note you can also get access to the IP address.

00:50.840 --> 00:56.600
You can see it here actually directly when you hover on the WiFi button.

00:56.600 --> 00:58.280
So this can be quite useful.

00:58.280 --> 01:00.930
Of course you need to get access to the Raspberry Pi first.

01:00.930 --> 01:06.480
But if you ever wondering what's the IP address, you know where to find it from the Raspberry Pi.

01:06.510 --> 01:12.960
Then another useful command you can type DF and then slash H.

01:12.990 --> 01:13.920
Just like that.

01:13.920 --> 01:20.910
I'm going to press enter and this one is quite useful to see how much space is available on your SD

01:20.910 --> 01:21.240
card.

01:21.240 --> 01:23.970
So you have a bunch of stuff, but you will find one.

01:23.970 --> 01:26.970
Usually that's like the biggest one here you can see 15GB.

01:26.970 --> 01:29.160
So that's the size of the SD card.

01:29.160 --> 01:30.690
So that's a 16GB.

01:30.690 --> 01:32.910
But here you see 15 for that partition.

01:32.910 --> 01:37.830
And you see that I have already used 6.4GB.

01:37.830 --> 01:42.450
So that's including the OS and every package that I have installed and all the files.

01:42.450 --> 01:49.020
For example if you take some photos and so everything that's on the on the SD card and I have 7.1GB

01:49.050 --> 01:49.620
available.

01:49.620 --> 01:51.060
So with this it's quite useful.

01:51.060 --> 01:57.630
You just type DF and then dash h and you see how much space is available for you to use.

01:57.630 --> 02:03.040
So maybe you can also see if you may need a bigger SD card for your future projects.

02:03.040 --> 02:09.310
And you can get also those basically the same information if you just open a file manager here, for

02:09.310 --> 02:10.810
example, it's in my home directory.

02:10.810 --> 02:14.740
But you see free space seven gigabytes.

02:14.770 --> 02:14.980
Okay.

02:15.010 --> 02:17.410
So that's more or less the same information.

02:17.410 --> 02:22.090
Then the third command I want to show you here is a pseudo.

02:22.120 --> 02:26.230
So you will need to use sudo raspi dash config.

02:26.230 --> 02:28.690
And actually we have used that previously.

02:28.690 --> 02:34.180
So when we first connect it with ssh to enable VNC that's the command that we have used.

02:34.180 --> 02:35.620
And you can use it again here.

02:35.620 --> 02:41.050
So sudo raspi config you press enter and you get to the same menu that we had before.

02:41.050 --> 02:43.840
So I press on the right key to go to finish.

02:43.870 --> 02:45.160
I'm not going to come back to this menu.

02:45.160 --> 02:46.870
Now you can also find this menu.

02:46.870 --> 02:53.500
So we have seen if you go on the menu here and that's going to be Preferences and Raspberry Pi configuration.

02:53.500 --> 02:56.710
That's going to be more or less the same thing.

02:56.720 --> 03:02.030
but actually you might have more options using the terminal menu.

03:02.030 --> 03:02.690
And why is that?

03:02.690 --> 03:08.840
Because most often the graphical tool is basically just based on top of the command line tool.

03:08.870 --> 03:13.460
Okay, it's not a different software, it's just that they used the command line tool and they built

03:13.460 --> 03:19.430
a graphical interface on top of it, which means that at most you have the same amount of functionalities,

03:19.430 --> 03:21.650
but you might have less functionalities.

03:21.650 --> 03:26.540
So when you have the choice between using a graphical tool and the command line for the same thing,

03:26.540 --> 03:30.530
you could expect to have actually more features with the command line.

03:30.530 --> 03:30.860
Great.

03:30.860 --> 03:31.880
And that's pretty much it.

03:31.880 --> 03:37.820
Then the last thing I want to show you is just how to shut down and reboot the Raspberry Pi from the

03:37.820 --> 03:38.540
terminal.

03:38.540 --> 03:41.810
So you have seen you can click here and then shut down.

03:41.810 --> 03:43.490
You can click on Shutdown and reboot.

03:43.610 --> 03:51.380
Quite classic stuff, but you can also do sudo shut down and you will need to provide a time.

03:51.380 --> 03:52.670
So you can just write.

03:52.700 --> 03:53.930
Actually no.

03:53.930 --> 03:55.620
If you do sudo shutdown down.

03:55.620 --> 03:58.020
Now it might ask you for the password or not.

03:58.020 --> 03:58.470
And then.

03:58.500 --> 04:01.380
Well, if you press enter here, it's just going to shut down the Raspberry Pi.

04:01.410 --> 04:04.140
So I'm not going to run this command now.

04:04.140 --> 04:10.470
And if you want to reboot the Raspberry Pi well you just do sudo reboot and it's going to reboot the

04:10.470 --> 04:10.980
Raspberry Pi.

04:10.980 --> 04:15.570
So of course after you press this you will lose the connection to VNC and the Raspberry Pi is going

04:15.570 --> 04:16.980
to reboot, etc..

04:17.010 --> 04:17.490
All right.

04:17.490 --> 04:21.210
So that's it for this introduction to the terminal on the Raspberry Pi.

04:21.240 --> 04:26.820
90% of what we saw in this section can be applied to any Unix system.

04:26.820 --> 04:31.770
So this is some knowledge that's going to be very useful for you in the future, not just for this course,

04:31.770 --> 04:34.890
but everything you do in the future that's related to it.

04:35.010 --> 04:38.310
And to finish, don't forget to download the PDF.

04:38.310 --> 04:41.490
So there is a recap PDF that you can download with this lesson.

04:41.490 --> 04:43.320
So that's the end of the section nine.

04:43.350 --> 04:48.030
Download this PDF so you can get access to all of the commands very quickly.

04:48.030 --> 04:51.450
So I encourage you to always keep the PDF on the side at first.

04:51.450 --> 04:54.990
And then as you get more practice, you will start to remember the commands.
