To install the Linux kernel headers and development files on a Fedora Linux system, you can use the dnf
package manager. Here’s how to do it:
- Open a terminal and update the
dnf
package manager’s cache by running the following command:sudo dnf makecache
- Install the kernel headers and development files by running the following command:
sudo dnf install kernel-headers kernel-devel
This command installs the kernel headers and development files for the currently running kernel on your system.
- If you need to install the headers and development files for a specific kernel version, you can specify the kernel version in the
dnf
command. For example, to install the headers and development files for the kernel version5.15.8-200.fc35.x86_64
, run the following command:sudo dnf install kernel-headers-5.15.8-200.fc35.x86_64 kernel-devel-5.15.8-200.fc35.x86_64
After the installation is complete, you should be able to compile and install kernel modules and other software that require the Linux kernel headers and development files.