The "yum" command is a package manager for Red Hat Enterprise Linux (RHEL) systems that allows you to install, update, and remove packages and their dependencies. Here are some examples of how to use the "yum" command on RHEL 5, 6, 7, 8, and 9:
yum install package-name
Replace "package-name" with the name of the package you want to install.
For example, to install the "openssh-server" package, you can use the following command:
yum install openssh-server
yum update package-name
Replace "package-name" with the name of the package you want to update.
For example, to update the "openssh-server" package, you can use the following command:
yum update openssh-server
yum remove package-name
Replace "package-name" with the name of the package you want to remove.
For example, to remove the "openssh-server" package, you can use the following command:
yum remove openssh-server
yum search package-name
Replace "package-name" with the name of the package you want to search for.
For example, to search for the "openssh-server" package, you can use the following command:
yum search openssh-server
yum list installed
This will list all of the packages that are currently installed on the system.
yum check-update
This will list all of the available updates for the installed packages.
These are just a few examples of how to use the "yum" command on RHEL systems. There are many other options and subcommands available, and you can use the "yum help" command to get a complete list of available options.
Keep in mind that you may need to use "sudo" to run the "yum" commands with root privileges, depending on your system configuration.
For example:
sudo yum install package-name