Hello and welcome back to this lesson.
So now you must have understood about the
package managers. Let's quickly see what
is m?
Yeah, so yum stands for Yellow Dog update
modified. So this is basically a
package manager, which is used to install
packages or applications into
rpm-based Linux distributions.
Now what is rpm so RPM basically
means red hat package managers. So red
hot is basically a Linux distribution, which
is generally used into the industry.
So M also works on different flavors
of operating systems and different versions
like Centos red hat and Fedora
which are some of the examples that use him.
So what is the syntax? It is very simple for initiating
anything using yum that
is install or remove you have to type M and
options command and the package name.
for example, if you want to install something then you
have to write yum install and the package
name, so
It's the Practical time and let's quickly see
that how can we use yum into our
computers?
Okay.
So here you can see onto your screen. I have
red hat Enterprise Linux, which has been set up
into my virtual machine. Now. Let's
see quickly. What is the version so that it
had release version is 8.3
I am able to see this using the command which
is cat Etc red hat -release
so you can also see what is the version this is
just to confirm that this is a red hat paste
operating system and now we are going to install and
use him.
So these operating systems such as
relat Enterprise Linux comes pre-installed
with M. So we are not going to install it as
it is already been installed, but you
have to see how you can configure it
and start using it now. Let me
just type em and hit enter.
And you can see that it comes up with a
sweet menu like this which means that DM is
configured and installed into your computer.
If you could have got an error that come
on not found that basically means that red hat
package manager or your red
hat Enterprise Linux does not have Yemen installed,
but most of the conditions it is already pre-installed.
Perfect. I'll just
clear the screen.
Now, let me just type em list. So when you
hit this command you are able to see that what are
the possible packages or apps that
are available into the Repository?
As you can see over here. So these are all the possible apps
or packages that can be installed into
your computer.
Now, let's quickly install something. So for
that we're going to use the command yum install and let's
try to install a package which is
wget. So wget if you're not aware, it
is basically a package or a command
whatever you like to call it, which is used to download
something using a terminal. So, let
me just hit enter.
And when I hit enter you can see we got a error which says
to install something into the computer.
You need to use sudo. All right.
So let's use sudo.
And again hit enter and then it will ask you to specify a
password.
So I'll just specify the password and you
can see.
It said package wget and the version number
is already installed into a computer.
All the dependencies has been successfully resolved Nothing
to Do complete.
now
it is already installed into a computer. So nothing was
basically done.
But if wget was not there into a computer
it would have downloaded it and also install or
resolve all the dependencies that comes
with duplicate. Now, this
is something awesome because if you try to
install a particular package from outside, which
is basically similar to how you install apks
into your mobile phone from other different
sources, but sometimes you have to compile some
dependencies
Okay, so you can see over here. It is successfully pre-installed
and we do not have to do anything over
here. Now. This is something
which is very awesome using a package manager because
you do not have to install all
the dependencies one by one individually the
package manager itself understands smartly that
what that
What are the dependencies which are required for
this tool to run? And it automatically installed those
dependencies now if just try
to install this tool or the package from outside and
if there are some possible dependencies then
it will just throw you errors and you have to
resolve or configure those particular errors
and install the dependencies by yourself.
It will become a tedious task hence package
managers comes handy and
it installs all the required dependencies
for that particular package easily. Alright,
so now let's really see one more
tool that we are going to install so let's say cool.
So I'm just going to type sudo yum installed curl.
And let's see what happens and perfect. It says it's
already installed. All the dependencies are
resolved. Nothing to do. Okay. So
now we are going to remove something from our computer. So for
that we are going to use the same command which is sudo yum,
but this time remove so let's say we're going to remove package
which is wget. So the command is
fairly pretty simple, which is sudo yum remove wget.
When you hit enter you can see removing over
here and into the red you can see double look
at has been successfully removed.
Over here it is asking you that it will take 2.8
MB space and this will basically
get read from your computer. Are you sure so I'll just
press Y and you can see that is basically removing
it. Once the product has been
removed removed as you can see over here. All the
dependencies are also being removed. So now this computer does
not have duplicate installed and when
you try to just run it it will throw your error saying
that W get is not there. And what is the process
to get back duplicate again? It's simple sudo.
M install duplicate and it
will basically install it.
So I hope you guys understood and you got a fair idea
about how to use yum to install and
remove packages from your computer. Thank you.