操作系统:ubuntu12.04
1、查看linux内核版本:
**@**-Aspire-4741:/$ uname -r
3.2.0-23-generic-pae
2、下载内核源码:
1、搜索内核代码: sudo apt-cache search linux-source(或 sudo apt-cache search source 3.2.0)
linux-source - Linux kernel source with Ubuntu patches
inux-source-3.2.0 - Linux kernel source for version 3.2.0 with Ubuntu patches
linux-source-2.6.32 - Linux kernel source for version 2.6.32 with Ubuntu patches
2、选择源码包并下载:sudo apt-get install linux-source-3.2.0
3、下载完成后,在/usr/src下,我ubuntu里多了linux-source-3.2.0以及一个链接
drwxr-xr-x 5 root root 4096 3月 30 18:00 linux-source-3.2.0
lrwxrwxrwx 1 root root 45 2月 28 07:11 linux-source-3.2.0.tar.bz2 -> linux-source-3.2.0/linux-source-3.2.0.tar.bz2
4、解压 : tar -xvf linux-source-3.2.0/linux-source-3.2.0.t