Este conteúdo não está disponível no idioma selecionado.

Chapter 1. The Linux kernel

download PDF

Learn about the Linux kernel and the Linux kernel RPM package provided and maintained by Red Hat (Red Hat kernel). Keep the Red Hat kernel updated, which ensures the operating system has all the latest bug fixes, performance enhancements, and patches, and is compatible with new hardware.

1.1. What the kernel is

The kernel is a core part of a Linux operating system that manages the system resources and provides 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.

Before Red Hat releases a new kernel version, the kernel needs to pass a set of rigorous quality assurance tests.

The Red Hat kernels are packaged in the RPM format so that they are easily upgraded and verified by the DNF package manager.


Kernels that have not been compiled by Red Hat are not supported 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. 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.
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 the following required sub-packages are properly installed:

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

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

Optional kernel packages are for example:

Contains kernel modules for rare hardware and modules which loading is disabled by default.
Contains a kernel with numerous debugging options enabled for kernel diagnosis, at the expense of reduced performance.
Contains tools for manipulating the Linux kernel and supporting documentation.
Contains the kernel headers and makefiles sufficient to build modules against the kernel package.
Contains information pertaining to the RHEL kernel ABI, including a list of kernel symbols that are needed by external Linux kernel modules and a dnf plug-in to aid enforcement.
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 that are needed for building most standard programs.

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

UKI combines the Linux kernel, initramfs, 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 sub-package.


kernel-uki-virt is provided as Technology Preview in RHEL 9.2.

1.4. Displaying contents of a kernel package

To determine if a kernel package provides a specific file, such as a module, you can display the file list of the package for your architecture by querying the repository. It is not necessary to download or install the package to display the file list.

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.


  1. List the available versions of a package:

    $ dnf repoquery <package_name>

    For example, list the available versions of the kernel-core package:

    $ dnf repoquery kernel-core
  2. Display the list of files in a package:

    $ dnf repoquery -l <package_name>

    For example, display the list of files in the kernel-core-0:5.14.0-162.23.1.el9_1.x86_64 package.

    $ dnf repoquery -l kernel-core-0:5.14.0-162.23.1.el9_1.x86_64

1.5. Installing specific kernel versions

Install new kernels using the dnf package manager.


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

    # dnf install kernel-{version}

1.6. Updating the kernel

Update the kernel using the dnf package manager.


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

    # dnf update 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.

Additional resources

1.7. Setting a kernel as default

Set a specific kernel as default using the grubby command-line tool and GRUB.


  • Setting the kernel as default, using the grubby tool

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

      # grubby --set-default $kernel_path

      The command uses a machine ID without the .conf suffix as an argument.


      The machine ID is located in the /boot/loader/entries/ directory.

  • Setting the kernel as default, using the id argument

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

      # grubby --info ALL | grep id
      # grubby --set-default /boot/vmlinuz-<version>.<architecture>

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

  • Setting the default kernel for only the next boot

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

      # grub2-reboot <index|title|id>

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

Red Hat logoGithubRedditYoutubeTwitter


Experimente, compre e venda


Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja oBlog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.