[No audio]
Downloading files or applications. Well,
in Windows when you have Windows
machine, Windows PC or laptop, if you
need to download anything like an
application or a game or a file, what do
you do? You actually open up your
browser, type in the link in the URL, if
you know the exact link, and you click
it, it will take you to that page, and
then you click on that download link
again, the next one, and it downloads it
right? Right here. But in Linux, we
don't have the GUI. So how do we
download a file, or how do we download
an application that we need to download?
Well, there is a tool in Linux, that's
called wget. w stands for world wide web
and get is of course to get it. So get
it from world wide web or to the
internet. This is the command that you
will get. And an example of, of the
command is wget followed by the exact
URL where the file is located. If the
file ends with dot tar, or dot zip, or
dot msi, whatever that is. You specify
the entire URL in the wget command.
Now, the question is, why? Why do we
even need to download any file or any
application or any program in Linux?
That's a very good question, right. But
there's one thing that you're missing.
And that is the yum command, you're
probably thinking of the yum command.
When you have a Linux machine and you
need to download any in package or any
file, you could just simply go to yum
followed by the name of the package or
the file, and then install and it
downloads or loads it for you. As in
this example, you have a server and the
server goes to another server to get a
file, in this case, that server
is the mirror or the repository where
the yum goes and installs all the
packages. But that server does not have
that file that you're looking for. Then
it goes to another server, our computer
will go into the server, but that server
is not listed as one of our repository.
So what do we do? How do we get that
file from from that server to our
server? We get it through the wget
command. And that's how we install it
into our machine. So let's take an
example of our Linux machine, I will run
the wget command in our Linux
machine and see how it works.
[author typing]
I will run it through the PuTTY, but
before I run it to the PuTTY, what do we
need? We need the IP address of our
PuTTY session sorry, off our Linux
machine, and how to find the IP. This is
something that you should know by heart.
So I have 192.168.1.12. I'll put
that in here, 192.168.1.12. I will
log in as myself, and the reason I have
this IP instead of 192.168.56.101 is
because I have in my virtual machine, if
you go to the Setting, and you go to
Network, I have Bridged Adapter. If I
had Host-only Adapter, then there
will be a communication between laptop
and this virtual machine. But now I
wanted to actually go outside of the
network. So that's why I have this
Bridged Adapter. And how am I connecting
on my laptop or my desktop is through the
wireless right, so just make sure you
have these settings. So I do, and I know I
have this IP address I used the PuTTY, I
put an IP address, I'm in. Now, just simply
go in and minimize this. And I will
minimize this as well. And I will take
an example of, let's say, I want to
install PuTTY in my Linux machine. So in
order to install it, you have to run yum
command and before you run yum command
you have to be root. So I'll do yum putty
install. That's the command right to
install any kind of PuTTY or any kind of
packages or file you're looking for.
Okay, so the yum went outside to his
repository and asked, do you have the
package PuTTY? It says no, I can't
sudo command putty, please make sure
yum. Sorry, I did run the command wrong.
It is yum install putty. I'm sorry,
but that's okay. Mistakes happen, right?
Okay, so yum install putty, go ahead and
Enter. And then you will see at the end
it says, No package putty available.
Error: Nothing to do. So it did go out
to the repositories, it did not find the
putty package. Now this is a perfect
example. Now at this point, I do need a
putty package for my Linux machine. So
what do I do? Well, you need to find out
where the link URL of the putty session
is. So I'll go into a browser, and I
will type in google.com. And I'll go to
download putty. I'm just going to the
Windows machine and to the web browser,
so I could get the link to download the
PuTTY. So this is the package for Unix
source archive, this is what this is the
one I have to download. So I'll right
click to it, I'll go to Copy Link
Location. So it has copied the link
location. I'll come here and just type
that location here just to make sure
that it does show me that it will
download the file. Yes, it will see. So
you just cancel it. Now you go back to
your Linux machine, and now this time
you type wget it's a long length, so
just make sure you extend or maximize
your window space, you right click on
your keyboard, and it will paste the
entire URL for you. So this is the URL
and once you hit Enter, see it is
connecting, it is downloading, you see
that. Amazing. Amazing. We have that
package, now, where is it? It will be
downloaded in the current working
directory where I am, and where am I at
this time, yeah so pwd, I'm in root. So
it should be in the root, and this is
it. putty-0.70, the version, tar.gz.
So that's the reason we need
that wget command so so people or users
or developers who cannot find their
packages that are on a third party
Windows website, they could use wget
command to actually download a file or
package or whatever that they're trying to install.
[No audio]