The current version of the Linux kernel can always be downloaded from
The Linux Kernel Archives web page (http://www.kernel.org/) in
the form of a large tar file compressed with either gzip or
bzip2, which is called the kernel tarball (it is worthy of noting
that the bz2 files are smaller than the gz ones, but gzip
is generally faster than bzip2).
After downloading the tarball you can extract the kernel's source code from it in many different ways (the virtue of UNIX-like systems). Our favorite method is to run either
$ tar xjvf linux-2.6.x.y.tar.bz2for the tarballs compressed with
bzip2, or
$ tar xzvf linux-2.6.x.y.tar.gzfor the ones compressed with
gzip, in the directory that we want to
contain the kernel sources. In principle, it can be an arbitrary directory, but
it should be located on a partition with as much as 2 GB of free space.
Of course, you can also follow the kernel's README literally and extract
the source code by executing one of the following instructions:
$ bzip2 -dc linux-2.6.x.y.tar.bz2 | tar xvf - $ gzip -cd linux-2.6.x.y.tar.gz | tar xvf -depending on what kind of a tarball you have downloaded. In any case it is not recommended to unpack the kernel tarball as
root.
As a result of unpacking the kernel tarball we get a directory the name of which
corresponds to the version of the kernel that will be obtained by compiling the
downloaded source code (eg. linux-2.6.18). The contents of this
directory are often referred to as the kernel tree. For this reason the
word ''tree'' is used for naming different development branches of the kernel.
For instance, instead of saying ''the development branch of the kernel
maintained by Andrew Morton'' it is more convenient to say ''the -mm tree''.