How To'sLinux

How To Update/Install Kernel Headers in Kali Linux

Installing the kernel headers in Kali Linux is sometimes necessary to install certain tools or software (i.e. VMware Tools). Follow this tutorial to learn how to do it.

Step 1:

First, we need to make sure that the official Kali Linux repositories are added to the “sources.list” file.

Open a Terminal and type leafpad /etc/apt/sources.list and press Enter.

Step 2:

In the file that opens, look over it. If it contains all the lines listed below, then you can close it and continue on to Step Three.

However, if it is empty or contains text different than the text listed below, deletes everything inside it and replace it with the below text:

deb http://http.kali.org/kali kali main non-free contrib

deb http://security.kali.org/kali-security kali/updates main contrib non-free

deb-src http://http.kali.org/kali kali main non-free contrib

deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

If you have to manually type it, be sure to double-check it, as even the slightest error will result in Kali Linux not updating properly.

Once you have finished, close leafpad and click Yes when it asks you if you want to save the changes.

Step 3:

Now, in the Terminal, type the below command:

apt-get update && apt-get install -y linux-headers-$(uname -r)

And press Enter.

Step 4:

It will ask you if you want to install the new updates (headers). Type Y for “yes” and press Enter again.

Step 5:

Once it has finished updating, and you’ve presented with the [email protected] prefix again, type reboot in the terminal to restart Kali Linux.

Noor Qureshi

Experienced Founder with a demonstrated history of working in the computer software industry. Skilled in Network Security and Information Security.

One Comment

  1. please help me to install virtualbox guest additions in kali linux
    well when I type uname -r it version is 4.13.0-kalil-amd64
    I can’t install virtualbox guest additions.please help me.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button