WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.910 --> 00:00:12.650
Hi. In this video we will learn how to use Jupyter Notebook Terminal.

1
00:00:14.000 --> 00:00:16.740
For those of you which are familiar with Linux,

2
00:00:16.810 --> 00:00:21.380
this video will be a little bit boring, but I have to explain the basics.

3
00:00:22.440 --> 00:00:24.500
For those of you who came from Windows,

4
00:00:25.270 --> 00:00:28.100
maybe you know the command line or PowerShell.

5
00:00:28.570 --> 00:00:31.420
They are very similar with slide differences,

6
00:00:33.560 --> 00:00:34.740
but is the terminal,

7
00:00:35.940 --> 00:00:39.620
terminal as you interact with the system in a command like fashion?

8
00:00:40.880 --> 00:00:44.420
And why is it useful and important for our work?

9
00:00:45.300 --> 00:00:47.430
Just to mention a few, uh,

10
00:00:47.530 --> 00:00:51.670
we can install packages and manage our Python environments.

11
00:00:53.330 --> 00:00:54.630
We can monitor the system,

12
00:00:56.650 --> 00:01:00.550
we can execute scripts and uh, schedule their execution.

13
00:01:01.330 --> 00:01:06.070
We can run the Python console directly from the terminal.

14
00:01:08.510 --> 00:01:11.610
It is a very useful tool for debugging.

15
00:01:13.590 --> 00:01:18.410
And we can work with system files directly in addition to the work folder,

16
00:01:18.580 --> 00:01:19.650
which we have mapped.

17
00:01:20.800 --> 00:01:25.380
And basically we have access to the whole system in the container,

18
00:01:25.960 --> 00:01:27.940
not only the mapped repository folder.

19
00:01:29.550 --> 00:01:34.530
Now I will show you a few basic commands for introduction and those which I use

20
00:01:34.550 --> 00:01:38.110
in my daily work. Now let's, uh,

21
00:01:38.160 --> 00:01:40.710
start our Jupyter and our terminal.

22
00:01:43.170 --> 00:01:47.450
Go to file, stop, click new terminal.

23
00:01:56.190 --> 00:02:00.630
And what do we see here? We are currently using, uh,

24
00:02:00.730 --> 00:02:04.110
the Anacondas, uh, base environment.

25
00:02:05.260 --> 00:02:09.620
Anaconda is a Python environment and a package manager.

26
00:02:10.570 --> 00:02:14.080
We'll learn the basics, uh, how to work with Ator.

27
00:02:15.540 --> 00:02:19.190
Then we see that we are locked as the Jovian user

28
00:02:20.650 --> 00:02:22.750
and this is the name of the system.

29
00:02:25.130 --> 00:02:28.830
Now I would like to see more information about our user.

30
00:02:29.630 --> 00:02:32.690
We can do this with the command id. We

31
00:02:34.770 --> 00:02:39.130
see here his ID and the groups where he belongs to.

32
00:02:41.380 --> 00:02:45.760
Now I would like to see what kind of reux version we are running in the

33
00:02:45.760 --> 00:02:50.320
container. We can do this, uh,

34
00:02:50.820 --> 00:02:54.520
to see the contents of the file called uh,

35
00:02:54.740 --> 00:02:56.840
os release in the E T C folder.

36
00:02:57.890 --> 00:03:01.970
And we can print the contents of a file with cat command.

37
00:03:02.390 --> 00:03:03.810
And this is the way how to do it.

38
00:03:11.670 --> 00:03:16.570
We see that we are running two version 22 with the long-term support.

39
00:03:21.490 --> 00:03:25.110
Now to navigation, let's print our working folder,

40
00:03:26.980 --> 00:03:28.980
p w d command we can use for this.

41
00:03:32.880 --> 00:03:36.220
Now let's uh, print the contents of our folder.

42
00:03:36.720 --> 00:03:38.940
We can use ll command for this.

43
00:03:42.210 --> 00:03:46.910
We see here a bunch of hidden folders, uh, together with our work folder.

44
00:03:47.440 --> 00:03:51.340
Let's navigate there. We can use the CD command.

45
00:03:51.890 --> 00:03:54.380
This is a shortcut for change directory.

46
00:04:02.230 --> 00:04:05.890
Now let's navigate to the folder for module number three

47
00:04:11.430 --> 00:04:15.770
and Linux terminal has auto completion. So now press up.

48
00:04:24.010 --> 00:04:27.200
Let's print the contents of the utilities patent script.

49
00:04:28.090 --> 00:04:30.610
I have mentioned that we can use the cat command for this

50
00:04:33.420 --> 00:04:34.840
and we see contents.

51
00:04:38.440 --> 00:04:40.020
Now let's create a new file.

52
00:04:40.640 --> 00:04:45.020
We can use the cat command for this as well. And this is the syntax.

53
00:04:53.580 --> 00:04:56.600
We can now input the contents line by line.

54
00:05:01.740 --> 00:05:04.280
And when we are finished, press Ctrl D.

55
00:05:13.440 --> 00:05:17.190
Let's, uh, check the file if we have it done correctly.

56
00:05:22.870 --> 00:05:23.703
Yes.

57
00:05:26.060 --> 00:05:30.280
Now let's upend a new line to this file without opening it.

58
00:05:31.680 --> 00:05:35.060
We can do this with the eco command and this is the syntax.

59
00:05:46.790 --> 00:05:49.690
Now let's check if we have it done correctly.

60
00:05:52.390 --> 00:05:56.370
We can move through history of our commands with arrows up and down.

61
00:06:00.990 --> 00:06:01.850
Yes, it's correct.

62
00:06:06.160 --> 00:06:07.580
Now let's create a new folder

63
00:06:09.230 --> 00:06:11.490
we can use for this meg directory command.

64
00:06:17.940 --> 00:06:19.680
Yes, and it has been created.

65
00:06:24.760 --> 00:06:29.340
Now let's copy the newly created file into the newly created folder.

66
00:06:29.920 --> 00:06:33.660
We can use the copy command for this and this is the syntax.

67
00:06:43.000 --> 00:06:45.300
Now let's check the contents of the new folder

68
00:06:50.730 --> 00:06:52.310
and the copy was successful.

69
00:06:57.250 --> 00:06:58.830
Now let's remove this file.

70
00:06:59.740 --> 00:07:02.400
We can do this with the RMM command.

71
00:07:11.940 --> 00:07:14.480
And now let's remove also the folder.

72
00:07:16.060 --> 00:07:18.600
We can do this also with the RMM command,

73
00:07:18.740 --> 00:07:23.270
but we have to input the R parameter, which means, uh,

74
00:07:23.670 --> 00:07:24.410
recursive.

75
00:07:24.410 --> 00:07:29.110
And this means that the contents of this folder will be removed,

76
00:07:29.140 --> 00:07:29.973
file by file

77
00:07:38.860 --> 00:07:42.280
and the deletion of the file. And also the folder will successful.

78
00:07:45.560 --> 00:07:50.020
Now I will show you a few other commands, which I use very frequently.

79
00:07:51.060 --> 00:07:54.700
Probably the most frequent command, which I use is the historic command.

80
00:07:59.260 --> 00:08:00.430
This command, uh,

81
00:08:00.700 --> 00:08:04.940
lets you see history of all your commands and,

82
00:08:05.120 --> 00:08:09.420
but is nice about it that, um, you see also its numbering

83
00:08:11.130 --> 00:08:14.430
and you can execute, uh, the command, uh,

84
00:08:14.560 --> 00:08:19.550
based on the number of this command. And this is the way how we do it.

85
00:08:19.730 --> 00:08:20.510
For example,

86
00:08:20.510 --> 00:08:24.780
I would like to execute command number

87
00:08:24.840 --> 00:08:29.260
31 where we printed the information about our system,

88
00:08:35.880 --> 00:08:36.713
right?

89
00:08:42.670 --> 00:08:46.730
We can also filter the output of the historic command.

90
00:08:46.830 --> 00:08:48.570
And this is the way how to do it.

91
00:08:59.420 --> 00:09:00.670
This is also very useful.

92
00:09:06.140 --> 00:09:09.240
Now I am also very curious about, uh,

93
00:09:10.300 --> 00:09:13.040
the Python version, uh, which we are using.

94
00:09:19.530 --> 00:09:21.270
And I would like to also see

95
00:09:22.930 --> 00:09:24.840
where is the Python executable

96
00:09:27.040 --> 00:09:29.260
we can use for this, uh, the beach command.

97
00:09:34.210 --> 00:09:38.160
Okay. And the last command,

98
00:09:38.160 --> 00:09:42.520
which I would like to show you is the top command. And with this command,

99
00:09:42.580 --> 00:09:44.920
you can monitor the system resources.

100
00:09:50.570 --> 00:09:53.990
You can exit with queue or Ctrl C,

101
00:10:00.160 --> 00:10:02.770
then you are in doubt on how to use some command.

102
00:10:02.830 --> 00:10:07.090
You can use help and this is the way how to do it. For example,

103
00:10:07.330 --> 00:10:10.970
I would like to see help for the copy command.

104
00:10:16.320 --> 00:10:17.500
And here, uh,

105
00:10:17.640 --> 00:10:22.500
we see all the information regarding parameters and how to use this command.

106
00:10:27.900 --> 00:10:32.320
You'll find all the commands which we used here in provided, uh,

107
00:10:32.880 --> 00:10:33.713
P D F file.

108
00:10:36.650 --> 00:10:40.260
That was it for the terminal. And in our next video,

109
00:10:40.760 --> 00:10:44.620
we will install few Jupyter Notebooks extensions.
