How to install Linex Kernel Headers on Kali Linux 2.0
Just installed Kali Linux 2.0 or upgraded to Kali Linux 2.0 and you need to install Kernel headers?. On our previous article we talked about how to upgrade to Kali Linux 2.0 (Kali Sana) from 1.x version of Kali Linux.When
you install new Kali Linux, it doesn't come with Linux kernel headers
out of the box and you'll have to install them manually, the easiest way
to do that will be explained shortly.
Kernel Header files in the Linux kernel are used for two purposes:
Follow the following short tutorial on how to install Linux kernel headers. If you are on Kali Linux 2.0, make sure you have the following repositories on your sources.list file:
If your Kali Linux version is 1.x, just do:
Kernel Header files in the Linux kernel are used for two purposes:
- To define interfaces between components of the kernel, and
- To define interfaces between the kernel and user space
Follow the following short tutorial on how to install Linux kernel headers. If you are on Kali Linux 2.0, make sure you have the following repositories on your sources.list file:
leafpad /etc/apt/sources.listor
vi /etc/apt/sources.listIf the following repositories doesn't exist, overwrite old ones with ones below.
# Regular RepositoriesThen do
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana/updates main contrib non-free
# Source repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana/updates main contrib non-free
sudo apt-get updateAfter that,check your kernel version by typing:
sudo apt-get upgrade
uname -rNow install kernel headers by typing:
apt-get install linux-headers-'value_of uname -r command'For example
apt-get install linux-headers-4.0.0-kali1-amd64See screeshot below for more details
If your Kali Linux version is 1.x, just do:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install linux-headers-$(uname -r)