How to install Linux Kernel Headers on Kali Linux 2.0 (Kali Sana)

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:
  • To define interfaces between components of the kernel, and
  • To define interfaces between the kernel and user space 
Linux headers are needed for building modulesthat 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.
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
or
vi /etc/apt/sources.list
If the following repositories doesn't exist, overwrite old ones with ones below. 
# 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
Then do
 sudo apt-get update
 sudo apt-get upgrade
After that,check your kernel version by typing:
uname -r
Now install kernel headers by typing:
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-4.0.0-kali1-amd64
See 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)
You can read my article on How to add Kali default repositories for Kali Linux 1.x

Search words
How to install kernel headers on Kali Linux
How to get Virtualbox working 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

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值