Looking for explanation on apt-get install linux-headers-generic. What does installing linux-headers for a kernel do ? The significance of that command at the time of kernel installation and after a reboot.

1 Answer 1


In general, the kernel is distribued as a compiled binary. The headers are the source code for the kernel and are generally needed if you are building kernel modules, either manually or with some packages such as nvidia or virtualbox.

Header files in the Linux kernel are used for two purposes:

  1. to define interfaces between components of the kernel, and

  2. to define interfaces between the kernel and user space

In general, user space programs are built against the header files provided by the distribution, typically from a package named glibc-devel, glibc-kernheaders or linux-libc-dev.

See also - http://kernelnewbies.org/KernelHeaders

Without additional information, hard to know what you needed the header for or if you can remove them.

  • And also can there be a scenario where header files of a kernel is updated or patched after a release of a kernel to fix an issue ? And the issue just goes away when you run a apt-get install linux-headers-generic.
    – paintbox
    Commented Jan 5, 2014 at 4:53
  • It depends on what you are using the headers for. In general they are needed if you need to compile a kernel module, either manually or automatically. You need to build the custom module for each kernel, so you need them when you update and build the custom module. You can automate the process with dkms - stackoverflow.com/questions/4215243/… and each distro manages this in different ways (fedora uses akmod). Headers are updated same as with any package.
    – Panther
    Commented Jan 5, 2014 at 15:02
  • If I install linux-headers-generic (via apt-get), why does linux-kernel-generic get removed? Commented Oct 9, 2015 at 4:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .