1 00:00:00,000 --> 00:00:01,530 [No audio] 2 00:00:01,530 --> 00:00:04,860 Downloading files or applications. Well, 3 00:00:04,860 --> 00:00:06,690 in Windows when you have Windows 4 00:00:06,690 --> 00:00:10,020 machine, Windows PC or laptop, if you 5 00:00:10,020 --> 00:00:11,880 need to download anything like an 6 00:00:11,880 --> 00:00:15,450 application or a game or a file, what do 7 00:00:15,450 --> 00:00:17,220 you do? You actually open up your 8 00:00:17,220 --> 00:00:21,900 browser, type in the link in the URL, if 9 00:00:21,900 --> 00:00:24,420 you know the exact link, and you click 10 00:00:24,420 --> 00:00:26,070 it, it will take you to that page, and 11 00:00:26,070 --> 00:00:28,770 then you click on that download link 12 00:00:28,770 --> 00:00:30,540 again, the next one, and it downloads it 13 00:00:30,540 --> 00:00:37,560 right? Right here. But in Linux, we 14 00:00:37,560 --> 00:00:40,260 don't have the GUI. So how do we 15 00:00:40,260 --> 00:00:42,990 download a file, or how do we download 16 00:00:42,990 --> 00:00:45,180 an application that we need to download? 17 00:00:45,900 --> 00:00:48,930 Well, there is a tool in Linux, that's 18 00:00:48,930 --> 00:00:52,980 called wget. w stands for world wide web 19 00:00:52,980 --> 00:00:55,680 and get is of course to get it. So get 20 00:00:55,680 --> 00:00:57,150 it from world wide web or to the 21 00:00:57,150 --> 00:00:59,220 internet. This is the command that you 22 00:00:59,220 --> 00:01:03,810 will get. And an example of, of the 23 00:01:03,810 --> 00:01:07,920 command is wget followed by the exact 24 00:01:07,950 --> 00:01:10,590 URL where the file is located. If the 25 00:01:10,590 --> 00:01:13,710 file ends with dot tar, or dot zip, or 26 00:01:13,710 --> 00:01:17,010 dot msi, whatever that is. You specify 27 00:01:17,010 --> 00:01:20,550 the entire URL in the wget command. 28 00:01:21,210 --> 00:01:25,890 Now, the question is, why? Why do we 29 00:01:25,890 --> 00:01:29,310 even need to download any file or any 30 00:01:29,310 --> 00:01:32,880 application or any program in Linux? 31 00:01:34,650 --> 00:01:37,470 That's a very good question, right. But 32 00:01:38,490 --> 00:01:40,770 there's one thing that you're missing. 33 00:01:40,980 --> 00:01:44,010 And that is the yum command, you're 34 00:01:44,010 --> 00:01:46,590 probably thinking of the yum command. 35 00:01:47,010 --> 00:01:49,530 When you have a Linux machine and you 36 00:01:49,530 --> 00:01:52,320 need to download any in package or any 37 00:01:52,500 --> 00:01:55,170 file, you could just simply go to yum 38 00:01:55,920 --> 00:01:58,740 followed by the name of the package or 39 00:01:58,740 --> 00:02:00,780 the file, and then install and it 40 00:02:00,780 --> 00:02:03,630 downloads or loads it for you. As in 41 00:02:03,630 --> 00:02:06,450 this example, you have a server and the 42 00:02:06,450 --> 00:02:08,729 server goes to another server to get a 43 00:02:08,729 --> 00:02:11,190 file, in this case, that server 44 00:02:11,190 --> 00:02:13,979 is the mirror or the repository where 45 00:02:13,979 --> 00:02:15,900 the yum goes and installs all the 46 00:02:15,900 --> 00:02:19,410 packages. But that server does not have 47 00:02:20,010 --> 00:02:22,920 that file that you're looking for. Then 48 00:02:22,920 --> 00:02:26,190 it goes to another server, our computer 49 00:02:26,190 --> 00:02:29,400 will go into the server, but that server 50 00:02:29,430 --> 00:02:33,120 is not listed as one of our repository. 51 00:02:33,660 --> 00:02:35,100 So what do we do? How do we get that 52 00:02:35,100 --> 00:02:36,990 file from from that server to our 53 00:02:36,990 --> 00:02:40,410 server? We get it through the wget 54 00:02:40,410 --> 00:02:43,800 command. And that's how we install it 55 00:02:43,830 --> 00:02:46,500 into our machine. So let's take an 56 00:02:46,500 --> 00:02:49,320 example of our Linux machine, I will run 57 00:02:49,770 --> 00:02:53,340 the wget command in our Linux 58 00:02:53,340 --> 00:02:54,930 machine and see how it works. 59 00:02:54,930 --> 00:03:00,000 [author typing] 60 00:03:00,000 --> 00:03:02,610 I will run it through the PuTTY, but 61 00:03:02,610 --> 00:03:04,680 before I run it to the PuTTY, what do we 62 00:03:04,680 --> 00:03:08,850 need? We need the IP address of our 63 00:03:08,850 --> 00:03:10,980 PuTTY session sorry, off our Linux 64 00:03:10,980 --> 00:03:14,730 machine, and how to find the IP. This is 65 00:03:14,730 --> 00:03:16,920 something that you should know by heart. 66 00:03:17,010 --> 00:03:20,940 So I have 192.168.1.12. I'll put 67 00:03:20,940 --> 00:03:28,560 that in here, 192.168.1.12. I will 68 00:03:28,560 --> 00:03:33,240 log in as myself, and the reason I have 69 00:03:33,270 --> 00:03:38,190 this IP instead of 192.168.56.101 is 70 00:03:38,190 --> 00:03:41,370 because I have in my virtual machine, if 71 00:03:41,370 --> 00:03:43,290 you go to the Setting, and you go to 72 00:03:43,290 --> 00:03:47,130 Network, I have Bridged Adapter. If I 73 00:03:47,130 --> 00:03:53,130 had Host-only Adapter, then there 74 00:03:53,130 --> 00:03:55,380 will be a communication between laptop 75 00:03:55,800 --> 00:03:58,050 and this virtual machine. But now I 76 00:03:58,050 --> 00:04:01,080 wanted to actually go outside of the 77 00:04:01,080 --> 00:04:02,940 network. So that's why I have this 78 00:04:02,940 --> 00:04:05,640 Bridged Adapter. And how am I connecting 79 00:04:05,670 --> 00:04:08,130 on my laptop or my desktop is through the 80 00:04:08,130 --> 00:04:09,690 wireless right, so just make sure you 81 00:04:09,690 --> 00:04:13,500 have these settings. So I do, and I know I 82 00:04:13,500 --> 00:04:15,990 have this IP address I used the PuTTY, I 83 00:04:15,990 --> 00:04:19,110 put an IP address, I'm in. Now, just simply 84 00:04:19,110 --> 00:04:21,899 go in and minimize this. And I will 85 00:04:21,899 --> 00:04:25,500 minimize this as well. And I will take 86 00:04:25,500 --> 00:04:28,140 an example of, let's say, I want to 87 00:04:28,140 --> 00:04:34,380 install PuTTY in my Linux machine. So in 88 00:04:34,380 --> 00:04:37,740 order to install it, you have to run yum 89 00:04:37,740 --> 00:04:40,260 command and before you run yum command 90 00:04:40,260 --> 00:04:45,540 you have to be root. So I'll do yum putty 91 00:04:45,780 --> 00:04:47,730 install. That's the command right to 92 00:04:47,730 --> 00:04:49,800 install any kind of PuTTY or any kind of 93 00:04:49,800 --> 00:04:51,510 packages or file you're looking for. 94 00:04:51,990 --> 00:04:54,480 Okay, so the yum went outside to his 95 00:04:54,480 --> 00:04:57,000 repository and asked, do you have the 96 00:04:57,000 --> 00:04:59,970 package PuTTY? It says no, I can't 97 00:05:00,000 --> 00:05:02,100 sudo command putty, please make sure 98 00:05:02,100 --> 00:05:06,690 yum. Sorry, I did run the command wrong. 99 00:05:07,140 --> 00:05:10,440 It is yum install putty. I'm sorry, 100 00:05:10,440 --> 00:05:12,750 but that's okay. Mistakes happen, right? 101 00:05:12,780 --> 00:05:16,380 Okay, so yum install putty, go ahead and 102 00:05:16,410 --> 00:05:18,930 Enter. And then you will see at the end 103 00:05:18,930 --> 00:05:22,110 it says, No package putty available. 104 00:05:22,920 --> 00:05:26,280 Error: Nothing to do. So it did go out 105 00:05:26,460 --> 00:05:29,730 to the repositories, it did not find the 106 00:05:29,730 --> 00:05:32,250 putty package. Now this is a perfect 107 00:05:32,250 --> 00:05:34,470 example. Now at this point, I do need a 108 00:05:34,470 --> 00:05:35,970 putty package for my Linux machine. So 109 00:05:35,970 --> 00:05:39,150 what do I do? Well, you need to find out 110 00:05:39,150 --> 00:05:41,520 where the link URL of the putty session 111 00:05:41,550 --> 00:05:46,440 is. So I'll go into a browser, and I 112 00:05:46,440 --> 00:05:53,730 will type in google.com. And I'll go to 113 00:05:53,970 --> 00:06:00,690 download putty. I'm just going to the 114 00:06:00,690 --> 00:06:04,440 Windows machine and to the web browser, 115 00:06:04,440 --> 00:06:06,750 so I could get the link to download the 116 00:06:06,750 --> 00:06:09,450 PuTTY. So this is the package for Unix 117 00:06:09,450 --> 00:06:11,730 source archive, this is what this is the 118 00:06:11,730 --> 00:06:14,130 one I have to download. So I'll right 119 00:06:14,130 --> 00:06:18,990 click to it, I'll go to Copy Link 120 00:06:19,020 --> 00:06:21,510 Location. So it has copied the link 121 00:06:21,510 --> 00:06:24,540 location. I'll come here and just type 122 00:06:24,600 --> 00:06:26,280 that location here just to make sure 123 00:06:26,280 --> 00:06:27,990 that it does show me that it will 124 00:06:27,990 --> 00:06:30,600 download the file. Yes, it will see. So 125 00:06:30,600 --> 00:06:33,750 you just cancel it. Now you go back to 126 00:06:33,750 --> 00:06:36,180 your Linux machine, and now this time 127 00:06:36,180 --> 00:06:40,350 you type wget it's a long length, so 128 00:06:40,350 --> 00:06:43,470 just make sure you extend or maximize 129 00:06:43,470 --> 00:06:47,100 your window space, you right click on 130 00:06:47,100 --> 00:06:49,830 your keyboard, and it will paste the 131 00:06:49,830 --> 00:06:52,980 entire URL for you. So this is the URL 132 00:06:52,980 --> 00:06:56,640 and once you hit Enter, see it is 133 00:06:56,640 --> 00:06:58,620 connecting, it is downloading, you see 134 00:06:58,620 --> 00:07:02,070 that. Amazing. Amazing. We have that 135 00:07:02,070 --> 00:07:04,260 package, now, where is it? It will be 136 00:07:04,260 --> 00:07:07,200 downloaded in the current working 137 00:07:07,200 --> 00:07:10,140 directory where I am, and where am I at 138 00:07:10,140 --> 00:07:13,470 this time, yeah so pwd, I'm in root. So 139 00:07:13,470 --> 00:07:16,470 it should be in the root, and this is 140 00:07:16,470 --> 00:07:20,791 it. putty-0.70, the version, tar.gz. 141 00:07:20,791 --> 00:07:23,580 So that's the reason we need 142 00:07:23,580 --> 00:07:28,350 that wget command so so people or users 143 00:07:28,350 --> 00:07:30,720 or developers who cannot find their 144 00:07:30,720 --> 00:07:33,450 packages that are on a third party 145 00:07:33,450 --> 00:07:35,880 Windows website, they could use wget 146 00:07:35,880 --> 00:07:39,180 command to actually download a file or 147 00:07:39,180 --> 00:07:42,511 package or whatever that they're trying to install. 148 00:07:42,511 --> 00:07:47,221 [No audio]