官术网_书友最值得收藏!

  • Kali Linux Cookbook
  • Willie L. Pritchett David De Smet
  • 128字
  • 2021-07-23 16:08:06

Preparing kernel headers

There will occasionally be times where we'll face the need to compile code which requires kernel headers. Kernel headers are the source code of the Linux kernel. In this first recipe, we'll explain the steps required to prepare kernel headers for later use.

Getting ready

An Internet connection is required to complete this recipe.

How to do it...

Let's begin the process of preparing kernel headers:

  1. We begin first by updating our distribution by executing the following command:
    apt-get update
    
  2. Next, we must use apt-get again to prepare the kernel headers. Execute the following command:
    apt-get install linux-headers - `uname –r`
    
  3. Copy the following directory and its entire contents:
    cd /usr/src/linux
    cp -rf include/generated/* include/linux/
    
  4. We're now ready to compile code that requires kernel headers.
主站蜘蛛池模板: 阿拉尔市| 广宗县| 铁力市| 哈密市| 山西省| 昌图县| 磐石市| 吴江市| 奈曼旗| 怀仁县| 平遥县| 乐亭县| 米泉市| 延安市| 榆中县| 来宾市| 遂昌县| 洪江市| 新巴尔虎左旗| 丰镇市| 都匀市| 辽源市| 田阳县| 库尔勒市| 罗甸县| 顺昌县| 堆龙德庆县| 贺兰县| 永丰县| 四川省| 三江| 洛阳市| 景宁| 泽普县| 五常市| 湖州市| 即墨市| 紫金县| 宁夏| 乌海市| 永福县|