1. 程式人生 > >Linux 核心原始碼(kernel source)

Linux 核心原始碼(kernel source)

  • 檢視核心的發行版:uname -r--kernel-release

    $ uname -r
    4.4.0-78-generic
  • 核心原始碼所在的位置:/usr/src

    $ cd /usr/src
    $ ll
    drwxr-xr-x  8 root root 4096 May 21 04:57 ./
    drwxr-xr-x 11 root root 4096 Apr 20  2016 ../
    drwxr-xr-x 27 root root 4096 Feb 26 19:04 linux-headers-4.4.0-64/
    drwxr-xr-x  7 root root 4096 Feb 26 19:04 linux-headers
    -4.4.0-64-generic/ drwxr-xr-x 27 root root 4096 May 1 01:10 linux-headers-4.4.0-75/ drwxr-xr-x 7 root root 4096 May 1 01:10 linux-headers-4.4.0-75-generic/ drwxr-xr-x 27 root root 4096 May 21 02:58 linux-headers-4.4.0-78/ drwxr-xr-x 7 root root 4096 May 21 02:58 linux-headers-4.4.0-78-generic/ lrwxrwxrwx 1 root root 32
    Apr 28 09:39 vboxhost-5.1.22 -> ../share/virtualbox/src/vboxhost/
  • 綜上,這裡的核心原始碼路徑(–kernel-source-path)即為:/usr/src/linux-headers-4.4.0-78-generic/