Categories

How to install Linux Kernel headers on Debian or Ubuntu

Written by Guillermo Garron .
Date: 2010-12-08 10:50:30 -0400

Since a long time not using it I tried to use VMware again today with my Debian Squeeze, and as the kernel have been upgraded, I had to reconfigure it by running

/usr/bin/vmware-config.pl

What is the location of the directory of C header files that match your running kernel? [/usr/src/Linux/include]

Install C header Linux Kernel on Debian or Ubuntu

To install the Linux Kernel headers on Ubuntu or Debian Linux run this command to install the sources for your kernel specific version.

sudo apt-get install linux-headers-$(uname -r)

And this command to install the generic package, and keep your sources up to date. Every time you run

sudo apt-get update && sudo apt-get upgrade

Your kernel and kernel headers will upgrade if an upgrade is available.

aptitude install linux-headers-2.6-686
Replace the “-686” for “-(xen vserver openvz)-686” or “-amd64” or “-686-bigmem”, if you need to. That depends on your architecture. Use uname -a to check yours.

Filled under: en|go2linux | permalink

If you enjoyed the article, please share it

twitter | facebook | google+ | linkedin | email | reddit