Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 1. The Linux kernel


The Red Hat kernel RPM package provides the Linux kernel. You must keep the kernel updated to ensure your system has the latest bug fixes, performance enhancements, patches, and hardware compatibility.

1.1. What the kernel is

The kernel is a core part of a Linux operating system that manages the system resources and provides an interface between hardware and software applications.

The Red Hat kernel is a custom-built kernel based on the upstream Linux mainline kernel that Red Hat engineers further develop and harden with a focus on stability and compatibility with the latest technologies and hardware.

The Red Hat kernels are packaged in the RPM format to upgrade and verify by the DNF package manager.

Warning

Red Hat only supports kernels that are compiled by Red Hat.

1.2. RPM packages

An RPM package consists of an archive of files and metadata used to install and erase these files on Red Hat Enterprise Linux (RHEL).

Specifically, the RPM package contains the following parts:

  • GPG signature

    The GPG signature is used to verify the integrity of the package.

  • Header (package metadata)

    The RPM package manager uses this metadata to determine package dependencies, where to install files, and other information.

  • Payload

    The payload is a cpio archive that contains files to install to the system.

There are two types of RPM packages. Both types share the file format and tooling, but have different contents and serve different purposes:

  • Source RPM (SRPM)

    An SRPM contains source code and a spec file, which describes how to build the source code into a binary RPM. Optionally, the SRPM can contain patches to source code.

  • Binary RPM

    A binary RPM contains the binaries built from the sources and patches.

1.3. The Linux kernel RPM package overview

The kernel RPM is a meta package that does not contain any files, but rather ensures that all required subpackages are properly installed.

The following list includes required packages:

kernel-core
Provides the binary image of the Linux kernel (vmlinuz).
kernel-modules-core
Provides the basic kernel modules to ensure core functionality. This includes the modules essential for the proper functioning of the most commonly used hardware.
kernel-modules
Provides the remaining kernel modules that are not present in kernel-modules-core.

The kernel-core and kernel-modules-core subpackages together can be used in virtualized and cloud environments to provide a RHEL 10 kernel with a quick boot time and a small disk size footprint. kernel-modules subpackage is usually unnecessary for such deployments.

Optional kernel packages are for example:

kernel-modules-extra
Provides kernel modules for uncommonly used kernel modules. Loading of the modules in this package is disabled by default.
kernel-debug
Provides a kernel with many debugging options enabled for kernel diagnosis, at the expense of reduced performance.
kernel-tools
Provides tools for manipulating the Linux kernel and supporting documentation.
kernel-devel
Provides the kernel headers and makefiles that are enough to build modules against the kernel package.
kernel-abi-stablelists
Provides information pertaining to the RHEL kernel ABI, including a list of kernel symbols required by external Linux kernel modules and a dnf plugin to aid enforcement.
kernel-headers
Includes the C header files that specify the interface between the Linux kernel and user-space libraries and programs. The header files define structures and constants required for building most standard programs.
kernel-uki-virt

Contains the Unified Kernel Image (UKI) of the RHEL kernel.

UKI combines the Linux kernel, initramfs (initial RAM file system), and the kernel command line into a single signed binary which can be booted directly from the UEFI firmware.

kernel-uki-virt contains the required kernel modules to run in virtualized and cloud environments and can be used instead of the kernel-core subpackage.

1.4. Displaying contents of a kernel package

To check if a kernel package provides a specific file, such as a module, query the repository. You can display the file list without downloading or installing the package.

Use the dnf utility to query the file list, for example, of the kernel-core, kernel-modules-core, or kernel-modules package. Note that the kernel package is a meta package that does not contain any files.

Procedure

  1. List the available versions of a package:

    $ dnf repoquery <package_name>
  2. Display the list of files in a package:

    $ dnf repoquery -l <package_name>

1.5. Installing specific kernel versions

You can install new kernels by using the DNF package manager.

Procedure

  • To install a specific kernel version, enter the following command:

    # dnf install kernel-<version>

1.6. Updating the kernel

You can update the kernel by using the DNF package manager.

Procedure

  1. To update the kernel, enter the following command:

    # dnf upgrade kernel

    This command updates the kernel along with all dependencies to the latest available version.

  2. Reboot your system for the changes to take effect.

    See the dnf(8) man page on your system for more information.

1.7. Setting a kernel as default

To set a specific kernel as the default, use the grubby command-line tool and GRUB configuration.

Procedure

  • Setting the kernel as default by using the grubby tool.

    • Enter the following command to set the kernel as default using the grubby tool:

      # grubby --set-default $kernel_path
  • Setting the kernel as default by using the version argument.

    • List the boot entries using the kernel keyword and then set an intended kernel as default:

      # select k in /boot/vmlinuz-*; do grubby --set-default=$k; break; done
      Note

      To list the boot entries using the title argument, enter # grubby --info=ALL | grep title.

  • Setting the default kernel for only the next boot.

    • Enter the following command to set the default kernel for only the next reboot using the grub2-reboot command:

      # grub2-reboot <index|title|id>
      Warning

      Set the default kernel for only the next boot with care. Installing new kernel RPMs, self-built kernels, and manually adding the entries to the /boot/loader/entries/ directory might change the index values.

Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2026 Red Hat
Retour au début