Ubuntu14.04 Install Linux Source __linux

Source: Internet
Author: User

1 Preface

By default, the Ubuntu system is not installed kernel source (only header files). This can be verified by looking at the /usr/src directory, as shown in the following illustration:


This is not easy to write drivers, so it is best to install a source code.

2 installation Kernel source code

Depending on the hints in reference [1], you can view the available source packages by following these commands:

sudo apt-cache search Linux-source
The results are as follows:

Visible from the above figure, only linux-source-3.13.0 is available for download and there are Ubuntu patches. Next you can download and install the above source code through the following commands:

sudo apt-get install linux-source-3.13.0

Upon completion, there will be more linux-source-3.13.0 and linux-source-3.13.0.tar.bz2in the /usr/src directory, where LINUX-SOURCE-3.13.0.TAR.BZ2 is a soft link whose real source code is in the linux-source-3.13.0 directory (the directory also contains Debian-related content),


At this point, you also need to decompress the above linux-source-3.13.0.tar.bz2 with the following command:

sudo tar-axvf linux-source-3.13.0.tar.bz2
The extracted files will remain in the linux-source-3.13.0directory, merging with the files in it.

reference materials

[Write my first driver under 1]ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.