This post was originally published on go2linux.org, a Linux blog I ran from 2007 to 2011. The domain is no longer mine, but I am the original author. I am republishing it here on garron.me with corrections and improvements.

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.