You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

Welcome to our article on How to install Linux 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 the 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.

Need for Linux headers

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 userspace

Linux headers are needed for building modules that load into the kernel provided by the Linux kernel. When you need to run virtual machines using hypervisors such as Virtualbox and Vmware Workstation on Kali Linux, it will require you to have Linux kernel headers installed.

How to install Linux Kernel Headers on Kali Linux 2.0

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.list


vim /etc/apt/sources.list

Modify repositories

If the following repositories don’t exist, overwrite old ones with ones below.

# Regular Repositories
deb sana main non-free contrib
deb sana/updates main contrib non-free

# Source repositories
deb-src sana main non-free contrib
deb-src 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 kernel headers

To install kernel headers, run the command:

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

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

$ apt-get install linux-headers-<version>

See screenshot below for more details

kernel headersFor 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)

You can read my article on How to add Kali default repositories for Kali Linux 1.x. That’s all about How to install Linux Kernel Headers on Kali Linux 2.0. Let me know in case you encounter any issues. I’ll be happy to help where possible.

How to install Linux Kernel Headers on Kali Linux 2.0 Search words
installing 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)
Kernel headers for Kali Linux

As an appreciation for the content we put out,
we would be thrilled if you support us!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


  1. nice article,it is useful to me and others to know about this items,please just keep it….


Please enter your comment!
Please enter your name here