1
00:00:04,410 --> 00:00:11,010
I have just explained you how you could enable a SSH server on Linux computer if it is not enabled and

2
00:00:11,010 --> 00:00:14,790
connect to Linux server remotely via secure protocol.

3
00:00:14,880 --> 00:00:15,570
Ssh.

4
00:00:15,600 --> 00:00:19,110
And actually here I am currently connected to via SSH.

5
00:00:19,140 --> 00:00:26,160
You see this information here in description of this step to our docker ubuntu container and I have

6
00:00:26,160 --> 00:00:28,230
just connected as root user.

7
00:00:28,260 --> 00:00:34,560
All right, now let me show you two additional utilities called curl and wget.

8
00:00:34,800 --> 00:00:39,150
Let's first type curl and here I see command not found.

9
00:00:39,150 --> 00:00:45,060
Let's quickly install it using apt get apt get install curl.

10
00:00:47,210 --> 00:00:47,950
Installing?

11
00:00:47,960 --> 00:00:48,620
Yes.

12
00:00:50,350 --> 00:00:53,200
And now let's clear terminal and enter key.

13
00:00:53,770 --> 00:00:57,970
And here as argument, let's supply host name of one of the servers.

14
00:00:57,970 --> 00:01:00,490
For example, let's use again google.com.

15
00:01:01,120 --> 00:01:09,550
And here I actually get HTML page of google.com and I get actually response that google.com page was

16
00:01:09,550 --> 00:01:10,040
moved.

17
00:01:10,060 --> 00:01:16,540
I get response 301 moved and here is location of the server I need to connect to.

18
00:01:16,570 --> 00:01:20,820
You see that prefix three was appended to google.com name.

19
00:01:20,830 --> 00:01:26,980
Let's use curl command, but now with host name three ws google.com like this.

20
00:01:27,580 --> 00:01:32,920
And now I get actually HTML page supplied by google.com server.

21
00:01:32,950 --> 00:01:41,020
You see that closing tag is HTML and with utility you are able to get actually content of the web page

22
00:01:41,020 --> 00:01:42,250
from the internet.

23
00:01:42,700 --> 00:01:46,920
Now let me show you one more utility called wget.

24
00:01:46,960 --> 00:01:47,830
This one.

25
00:01:47,830 --> 00:01:55,160
And with this utility, you could download any file from Internet, for example, archive or some image

26
00:01:55,160 --> 00:01:57,710
or some text file, anything you want.

27
00:01:57,920 --> 00:02:02,450
And let's, for example, download the image from the Google.com website.

28
00:02:02,780 --> 00:02:07,700
Let's open up a web browser and open up new tab and enter here Google.com.

29
00:02:09,150 --> 00:02:11,460
And here, let's inspect this page.

30
00:02:11,460 --> 00:02:13,620
Right button, click inspect.

31
00:02:15,150 --> 00:02:19,290
Next, please click on this selector element icon.

32
00:02:19,290 --> 00:02:20,070
This one.

33
00:02:21,040 --> 00:02:23,680
And click afterwards on this image.

34
00:02:24,780 --> 00:02:30,390
And here, if you'll remove a bit this part, you'll see actual location of the image.

35
00:02:30,390 --> 00:02:32,460
Let me make it a bit larger.

36
00:02:33,810 --> 00:02:34,740
Like so.

37
00:02:34,740 --> 00:02:36,480
And here is this location.

38
00:02:36,630 --> 00:02:38,130
It is PNG file.

39
00:02:38,130 --> 00:02:45,660
Let me copy this path src and here let's append it to this hostname like this.

40
00:02:45,690 --> 00:02:48,330
It is entire path for this icon.

41
00:02:48,330 --> 00:02:52,560
If I press enter here in web browser, I'll see this icon right here.

42
00:02:52,800 --> 00:02:57,270
Let's now use this path in wget command.

43
00:02:57,300 --> 00:02:58,260
I'll copy it.

44
00:02:58,260 --> 00:03:07,200
And here enter w get like this and paste copied URL again, this URL for specific image that is served

45
00:03:07,200 --> 00:03:09,000
by google.com server.

46
00:03:09,120 --> 00:03:16,020
Let's press enter and you'll see that this image was just downloaded to this computer.

47
00:03:16,170 --> 00:03:21,050
And if I enter ls, I'll see this image in the home directory.

48
00:03:21,120 --> 00:03:23,730
It is current directory for this root user.

49
00:03:23,760 --> 00:03:24,930
Google logo color.

50
00:03:24,930 --> 00:03:28,290
And here is actually the entire name of this PNG image.

51
00:03:29,550 --> 00:03:35,370
That's how you could use w get command in order to download some files from internet.

52
00:03:35,640 --> 00:03:43,830
Let me quickly get back to command and show you how you could save page to the file and actually you

53
00:03:43,830 --> 00:03:44,760
know how to do that.

54
00:03:44,760 --> 00:03:52,320
And please pause the video now and try to save web page served by three ws google.com to the file.

55
00:03:56,190 --> 00:03:57,790
All right, let's do that together.

56
00:03:57,810 --> 00:04:01,710
You have seen that with command and argument.

57
00:04:01,710 --> 00:04:06,720
Three ws google.com result will be printed actually to the terminal.

58
00:04:06,720 --> 00:04:13,230
And the reason for that is that by default stdout data stream is sent to the terminal.

59
00:04:13,650 --> 00:04:19,290
And if you want to redirect it to the file you could use greater than sign operator.

60
00:04:19,440 --> 00:04:24,390
You remember that from the previous lectures and here we could give name to the file.

61
00:04:24,390 --> 00:04:26,550
Let's say google dot HTML.

62
00:04:27,560 --> 00:04:32,260
And now I see that page was received and saved to this file.

63
00:04:32,270 --> 00:04:34,850
I don't see this output here in the terminal.

64
00:04:34,850 --> 00:04:40,730
And if I list files here now, I will see additional file google dot HTML.

65
00:04:41,600 --> 00:04:43,970
And if I read contents of this file.

66
00:04:43,970 --> 00:04:46,430
Sorry it wasn't auto completed for some reason.

67
00:04:46,430 --> 00:04:50,570
Google dot HTML and now I see contents of this file.

68
00:04:50,780 --> 00:04:55,250
That's how you could use wget and C utilities.

69
00:04:55,280 --> 00:04:57,080
That's all for this quick lecture.

70
00:04:57,080 --> 00:05:03,560
And in the next one I want to talk about environment variables and I'll show you how to get currently

71
00:05:03,560 --> 00:05:05,840
set environment variables for current session.

72
00:05:05,840 --> 00:05:11,540
And also I'll explain you how to create new environment variables and use them afterwards.

73
00:05:11,590 --> 00:05:13,240
I'll see you guys in the next lecture.

74
00:05:13,250 --> 00:05:13,880
Bye bye.

