Linux Kernel search and source code download

Source: Internet
Author: User
Linux Kernel search and source code download
Release date: Source: IBM developerworks Chinese Author: Daniel Robbins President/CEO

Kernel version

To compile the latest kernel, you must first download its source code. Before downloading the source code of the kernel, you need to know what you are looking. First, you have to ask your own question: Do you need a stable or test version of the kernel?

The second digit of a stable version kernel usually uses an even number. For example, 2.0.38, 2.2.15, 2.2.18, and 2.4.1 are considered "stable" kernels (because they contain 0, 2, 2, and 4, respectively ). If you want to try the test kernel, you usually need to find the kernel with the highest number and an odd number in the second digit of the version number. For example, 2.3.99 and 2.1.38 are both beta kernels (because they contain 3 and 1 ).

Kernel version history

The 2.2 series kernel is considered a newer and stable kernel. If "newer" and "stable" are what you want, the third digit of a version number is the highest 2.2 kernel (2.2.16 is the latest version ).

When the 2.2 series kernel is still under development, the 2.3 series has started. This series is a beta version of new and advanced features that will be integrated into the 2.4 stable series. The 2.3 series has reached 2.3.99 and its development has stopped. The developer has started 2.4.0. If you prefer to use the latest technology, you may want to use the latest 2.4 series kernel that you can find.

2.4 kernel warning information

Once a real 2.4 series kernel comes out (like 2.4.0), don't assume that the kernel is ready for use on a mission-critical system like a server. even though 2.4 is supposed to be a stable series, early 2.4 kernels are likely to be not quite up to snuff. as is often the case in the computer industry, the first version of anything can have fairly sizable bugs. while this may not be a problem if you're testing the kernel on your home workstation, it is a risk you may want to avoid when you machine provides valuable services to others.

Download Kernel

If you only want to compile a new version of the kernel that you have installed (for example, SMP support), you do not need to download any code-skip this part to continue the next screen.

You canHttp://www.kernel.org/pub/linux/kernelFind the kernel code. When you enter, you will find that the source code of the kernel is organized into multiple directories by kernel version (v2.2, v2.3, and so on. In each directory, you will find files labeled "linux-x.y.z.tar.gz" and "linux-x.y.z.tar.bz2 ". These are the source code of the Linux kernel. You will also see the document with "patch-x.y.z.gz" and "patch-x.y.z.bz2. These are patch packages used to update the complete kernel source code. If you want to compile a new kernel version, you need to download one of these "Linux" files.

Kernel unpacking

If you have downloaded a new kernel from kernel.org, it is time to unpack it.

First, CD/usr/src. If there is a "Linux" directory, change it to "Linux. Old" ("Mv Linux. Old" with root permission ).

Now, you can unlock the new kernel package. Still in the/usr/src directory, enter TAR xzvf/path/to/My/kernel-x.y.z.tar.gz or CAT/path/to/My/kernel-x.y.z.tar.bz2 | Bzip2-d | tar xvf -, the downloaded source code is compressed using gzip or Bzip2. After entering this command, the downloaded kernel source code will be released to a new "Linux" directory. Note-the full set of kernel source code usually occupies more than 50 MB space on the hard disk!

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.