To list or install only security updates using the yum
package manager on a Red Hat Enterprise Linux (RHEL) or CentOS system, you can use the --security
option with the yum update
or yum list
command.
For example, to list all available security updates on a RHEL or CentOS system, you can use the following command:
yum list --security
To install all available security updates on a RHEL or CentOS system, you can use the following command:
yum update --security
Keep in mind that the yum
command will update only packages that are currently installed on the system. If you want to install a specific security update that is not currently installed on the system, you can use the yum install
command followed by the name of the package you want to install. For example:
yum install <package_name>
Replace <package_name>
with the name of the package you want to install.
Note that the yum
command will install all the dependencies required by the package you are installing, so you may end up installing more packages than you intended. To prevent yum
from installing dependencies, you can use the --nodeps
option with the yum install
command. For example:
yum install --nodeps <package_name>
Keep in mind that the --security
option is only available in certain versions of yum
, and it may not be available on all systems. Consult the yum
documentation and online resources for more information on how to use the --security
option and other options available with the yum
command.
Also note that the steps and commands shown above are specific to RHEL and CentOS systems, and the exact details may vary depending on the version of the operating system and the specific configuration of your system. Consult the documentation and online resources for more information on how to use the yum
command on RHEL and CentOS systems.