How to install Linux kernel header files on Kali Linux 2.0 (Kali Sana)

Welcome to our article “How to Install Linux Kernel Headers on Kali Linux 2.0”. Just installed Kali Linux 2.0 or upgraded to Kali Linux 2.0, do you need to install the kernel header files? In the previous article, we discussed how to upgrade from 1.x version of Kali Linux to Kali Linux 2.0 (Kali Sana). You will have to install them manually, the easiest way will be explained later.

Requires Linux header

Kernel header files Linux kernel Serves two purposes:

  • Define interfaces between kernel components, and
  • Define the interface between the kernel and user space

The Linux headers are needed to build the module into the kernel provided by the Linux kernel. When you need to run a virtual machine using a hypervisor (such as Virtualbox and VMware Workstation on Kali Linux), you will need to install the Linux kernel headers.

How to install Linux kernel headers on Kali Linux 2.0

Please follow the short tutorial on how to install Linux kernel Header. If you are using Kali Linux 2.0, make sure you have the following repositories in the sources.list file:

leafpad /etc/apt/sources.list

Either

vim /etc/apt/sources.list

Modify repository

If the following repositories do not exist, overwrite the old repositories with the following repositories.

# Regular Repositories
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

Update apt-cache and upgrade:

Then do:

$ sudo apt-get update
$ sudo apt-get upgrade

After that, check your kernel version by typing:

$ uname -r

Install the kernel header files

To install the kernel headers, run the following command:

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

You can also append the kernel version to the Linux-headers command.

$ apt-get install linux-headers-

See the screenshot below for more details

For your Kali Linux version is 1.x, just do the following:

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

You can read the article on how to add Kali default repositories for Kali Linux 1.x. That’s all there is to how to install the Linux kernel headers on Kali Linux 2.0. If you encounter any problems, please let me know. I will serve you wholeheartedly.

How to install Linux kernel headers on Kali Linux 2.0
Install kernel headers on Kali Linux
Install Virtualbox on Kali Linux
Running Virtualbox on Kali Linux 2.0
How to install Linux-headers-4.0.0-kali1-amd64 on Kali Linux 2.0 (Kali Sana)
Kali Linux Kernel Header

Sidebar