List of content you will read in this article:
It can also add new packages, remove old ones, and query the installed and usable packages, among other things. Some high-level kit developers are similar to yum, such as apt-get and smart. So in this article, we will give you complete details on using the yum command in the Linux operating system.
Yum Command in Linux
The most often used solutions as seen in the examples below.
- Install any sample xyz kit from the system's repository:
# yum install xyz
- Install any package from the local directory:
# yum localinstall pkg.rpm
- You may also use a specific FTP website to install a package:
# yum localinstall website_package_link
- To replace any missing files, reinstall the latest version of the package nfs-utils:
# yum reinstall nfs-utils
- Install all of the packages in the "Web server" group:
# yum groupinstall "Webserver"
To delete packages, you can use the yum command.
- vsftpd and all its dependencies are being removed from the system by using the below command:
# yum remove vsftpd
You may also use the erase function, which works similarly to remove.
- Another option, autoremove, which was implemented in RHEL 7, can be used to delete a package along with other not needed packages:
# yum autoremove httpd
- Using the swap option to uninstall one kit and add another with a single command:
# yum swap vsftpd iftp
Upgrading and Downgrading Kits
- To upgrade all of the packages on the system [yum upgrade], use the command given below:
# yum update
- To upgrade a particular package, such as httpd, use the following commands:
# yum update httpd
- To restore a package to a previous edition, follow these steps:
# yum downgrade pkg_name
If you don't Want to Interact while Using Yum
Or used for every yum button, the -y option implies yes for any query and makes a non-interactive use of the yum command. It can be a club with any of the functions we've already used. It's particularly helpful in the following situations:
yum update -y
Yum command not found?
yum is an integrated package manager focused on rpms. Based on "repository" metadata, it can execute code maintenance automatically, including dependency analysis and redundant processing. It may also add new packages, remove old packages, and query the installed and/or usable packages, among a variety of other commands/services. Some high-level kit developers, such as apt-get and smart, are similar to yum.
- Go to pkgs.org for more information and download the yum package.
- Look for the yum rpm package for the Rhel version and architecture (x86 or x86 64).
- The rpm kit can be downloaded from the website.
- Su -c 'rpm -i /Downloads/*.rpm or the graphical file manager should be used to install it.
If the yum command is not found in your system you can download it from pkgs.org and execute it according to the above instruction to install yum into your system.
In the above information, we explain how you can use the yum command and the various option commands associated with the yum command. We can easily remove, update, downgrade and install packages with yum. If you want a non-interactive session with yum, you can use the -y command. You can also buy linux vps to practice it on a routine basis.
People also read: