Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy





ketchup is a very handy tool used to update or switch between different versions of the Linux kernel source tree. It has the ability to:

  • Find the latest version of the kernel, download it, and uncompress it.

  • Update a currently installed version of the kernel source tree to any other version, by patching the tree to the proper version.

  • Handle the different development and stable branches of the kernel tree, including the -mm and -stable trees.

  • Download any patches or tarballs needed to do the update, if they are not present on the machine already.

  • Check the GPG signatures of the tarball and patches to verify that it has downloaded a correct file.

ketchup can be found at and has lots of additional documentation in the wiki at .

Here is a set of steps that show how simple it is to use ketchup to download a specific kernel version, and then have it switch the directory to another kernel version with only a minimal number of commands.

To have ketchup download the version of the kernel source tree into a directory, and rename the directory to be the same as the kernel version, enter:

mkdir foo

cd foo

ketchup -r

None ->
Unpacking linux-2.6.17.tar.bz2
Applying patch-2.6.17.bz2 -R
Applying patch-
Current directory renamed to /home/gregkh/linux/linux-

Now, to upgrade this kernel to contain the latest stable kernel version, just enter:

ketchup -r 2.6 ->
Applying patch- -R
Applying patch-2.6.17.bz2
Downloading patch-
           => `/home/greg/.ketchup/patch-'
Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36,809 (36K) [application/x-bzip2]

100%[====================================>] 36,809        93.32K/s

22:21:14 (92.87 KB/s) - `/home/greg/.ketchup/patch-' saved [36809/36809]

Downloading patch-
           => `/home/greg/.ketchup/patch-'
Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 248 [application/pgp-signature]

100%[====================================>] 248           --.--K/s

22:21:14 (21.50 MB/s) - `/home/greg/.ketchup/patch-' saved [248/248]

Verifying signature...
gpg: Signature made Wed Aug 23 15:01:04 2006 PDT using DSA key ID 517D0F0E
gpg: Good signature from "Linux Kernel Archives Verification Key >[email protected]<"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: C75D C40A 11D7 AF88 9981  ED5B C86B A06A 517D 0F0E
Applying patch-
Current directory renamed to /home/greg/linux/tmp/x/linux-

This shows that ketchup automatically determined that the newest stable version was, and downloaded the needed patch files in order to get to that version.

It is highly recommended that you use ketchup if you want to download any Linux kernel source trees. It takes all of the work in finding where on the server the correct patch file is, and automatically will apply the patch in the properly format, after checking that the downloaded file is properly signed. Combine ketchup with quilt and you have a very powerful setup that contains everything that you need in order to deal effectively with kernel sources as a Linux kernel developer.

  Published under the terms of the Creative Commons License Design by Interspire