Supposing that I am going to install a package, what's the difference between these two commands: rpm -ivh <package>
and yum install <package>
same question for example with rpm -Uvh <package>
and yum update <package>
(for updating issue)
Supposing that I am going to install a package, what's the difference between these two commands: rpm -ivh <package>
and yum install <package>
same question for example with rpm -Uvh <package>
and yum update <package>
(for updating issue)
For rpm
you must specify where to get the file with the new version of the package.
yum
, which is a more intelligent management system, try to find a new version of the package in their repositories, will look for the package dependencies, will look for the fastest repository mirror (and make a lot of other pleasantrie)
rpm
- RPM Package Manager.yum
- is an interactive, rpm based, package manager.there is no difference if you're installing single file as both yum
which is wrapper for rpm
and they both offers same core functionality, however yum
can do more as yum
works with repo(s) and it can handle updates & has plugins, while rpm
works with file(s).
If you want to know if a package was installed using rpm or through yum, issue "yum list installed" and check the 3rd column. If it is:
---"installed" then it was installed using rpm command
---"@base" or other repo, it means it has been installed through yum from a repo
---"@"example_filename. A filename after @ means it has been installed using "yum localinstall package.rpm", so a local rpm install through yum
It's best to install through yum because it also resolves dependencies. And if you compile from source code&install (e.g. you can't find the needed package for your distro), these installs are not registered in rpmdb so yum and rpm will not display and manage those installations afterwards.