How to install all the patches except kernel on CentOS and RHEL ?

Using the ‘–exclude=kernel*’ parameter in the yum command we can install all patches except kernel. Example is shown below

# yum update –exclude=kernel*

Add the below entry in the file ‘/etc/yum.conf’ to prevent updating kernel permanently.

exclude=kernel*