How to download linux kernel source code under ubuntu

1. First look at your own kernel version. If you don't want to download the version that matches the kernel you are using, you can ignore this step.

2. Download the kernel code, 98M, the speed is relatively fast,

3. After completion, go to /usr/src to view the source code you have downloaded

4. Now you can decompress,struggle

Before unzipping, review the tar command.

-c: create compressed archive

-x: decompress

-t: view content

-r: Append files to the end of the compressed archive

-u: Update the files in the original archive

-z: with gzip attribute

-j: with bz2 attribute

-f: create a new filename

-v: show all processes

-C: Extract the file to a specific folder

In fact, just remember three, as follows:

Compression: tar -jcv -f filename.tar.bz2 The file or folder to be compressed

View: tar -jtv -f filenma.tar.bz2

Decompression: tar -jxv -f filename.tar.bz2 -C directory to be decompressed

I unpacked him into my home.

Now you can go to linux-source-3.13.0 and take a look


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325945694&siteId=291194637