From Gentoo Wiki
Jump to:navigation Jump to:search

linux-headers is a package providing the Linux kernel headers. These are part of the kernel, although they are shipped separately (further reasoning is available: [1]). The headers act as an interface between internal kernel components and also between userspace and the kernel. Packages like sys-libs/glibc depend on the kernel headers.


USE flags

USE flags for sys-kernel/linux-headers Linux system headers

headers-only Install only C headers instead of whole package. Mainly used by sys-devel/crossdev for toolchain bootstrap.


Install sys-kernel/linux-headers:

root #emerge --ask sys-kernel/linux-headers


A common question regarding linux-headers is whether you need to keep them synced with your kernel version. The answer is no. You can have a newer linux-headers version than your running kernel binary.

So for example, if you have kernel 4.1 installed, you can have linux-headers 4.4. If you compile your glibc with this newer headers and later upgrade to kernel 4.4, you will be able to use the new features of this kernel without recompiling glibc again.

For more information read glibc FAQ and [2].

External resources