Howto: Upgrade Linux Kernel

by on January 12, 2007 · 23 comments· LAST UPDATED October 22, 2009

in , ,

How do I upgrade my Linux kernel? I would like to upgrade kernel without compiling from source code i.e. binary upgrade. How do I perform the actual upgrade of the kernel in Linux?

You need to compile kernel only if:
=> You need custom made kernel for specific task such as embedded kernel.

=> Apply third party security patches.

=> You need to apply specific patch to Linux

Upgrade of the kernel in Red Hat enterprise Linux version <= 4.x

If your system is registered with Red Hat Network (RHN), then you can use the up2date command as follows:
# up2date -f kernel
For SMP kernel (multi core or multiple CPU) use command:
# up2date -f kernel-smp

Upgrade of the kernel in Fedora Linux / CentOS / RHEL 5

Use yum command to upgrade kernel:
# yum update kernel

If you have downloaded RPM file use rpm command:
# rpm -ivh kernel*

Upgrade of the kernel in Debian or Ubuntu Linux

Use apt-get command. First find your kernel version:
$ uname -r
Next find available kernel images:
$ apt-cache search linux-image
Now install kernel by explicitly specifying version number:
# apt-get install linux-image-x.x.x-xx
$ sudo apt-get install linux-image-x.x.x-xx

Upgrade of the kernel in Gentoo Linux

=> Please refer official Gentoo Linux Kernel Upgrade Guide

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 23 comments… read them below or add one }

1 Thilak April 19, 2007 at 4:48 pm


I have upgrade Redhat Enterprise Linux 4 update 4 to update 7 .. Could you please tell me
procedure to upgrade..

Thanks in advance.


2 MP July 26, 2011 at 4:40 pm

Hi, i want to update the kernel 32bit to 64 bit locally, how can i do that.
Any suggestion…?


3 Bernard Hines May 1, 2007 at 3:52 pm

I need to upgrade a server from SLES-7 to SLES-10. I have transferred the users Id’s, groups, directories and files, plus the (passwd, shadow etc). The IP, network names etc. remain the same. Users can sign in and access their files. I have one user who uses “host key authentication” to login, FTP and he is failing. Does he have to rebuild the private and public keys or did I miss a file? What piece of physical server information does “host key authentication” use to tell it that it is on the original server?


4 nixCraft May 1, 2007 at 5:13 pm

Host identification get changed when you make changes to system like reinstall sshd / or server software or change in IP address. Ask your user to rebuild the private and public keys.


5 Hossam Hammady March 10, 2009 at 11:37 am

To get kernel versions available on Ubuntu we do:
apt-cache search linux-image
instead of:
apt-cache search kernel-image


6 Santosh singh rawal May 9, 2009 at 1:51 pm

I am working on Linux Rhel, Fedora .
Is there any forum, group to provide support for all the queries. Regrding Updation,configuration,Hardware support


7 nixCraft May 9, 2009 at 4:28 pm
8 manoj jasawat July 10, 2009 at 11:03 am

how to configure virtual server at RHEL5.


9 Philippe Petrinko October 22, 2009 at 11:45 am

Hi Vivek,

Useful topic.

BTW, I think that current DEBIAN distribution call its kernel image packages “linux-image” and not “kernel-image”.
Would you check and update your topic ?

— Philippe


10 nixCraft October 22, 2009 at 12:39 pm

@Philippe / Hossam,

The faq has been updated. Older version and installer (I think it is still valid in lenny too) used to call it kernel-image. However, they made this change last year or so…

Appreciate both of your posts!


11 Ahmed May 12, 2010 at 8:16 pm

Well that helped me tho


12 tsog June 18, 2010 at 3:59 am

Thanks for the tip. I had to reinstall a kernel I deleted on Ubuntu, and everywhere I looked on google only offered tips on compiling or removing kernels, not installing from the source.
Thanks again.


13 Anton July 31, 2010 at 11:43 am

That works fine both in Ubuntu 10.04 and Mint 9. Thanks a lot.


14 Rishabh Dangwal September 2, 2010 at 5:51 pm

Is there any way to replace the exisiting kernel by upgrading it ? Whenever I upgrade my kernel, I get a new entry in boot loader,with entirely new settings. Any ideas ?


15 Stefan Lasiewski September 21, 2010 at 11:44 pm

This guide is missing a step. You’ll need to reboot the machine to load the new Kernel.

Without this step, your machine is still running the old kernel, and is still vulnerable to any bugs or exploits for that old kernel.


16 anupgirdhar October 5, 2010 at 4:34 pm

now I have a problem once i update my kernel? My hardware stop responding on upgration, where my existing kernel is fit and fine but I want to make few changes in the existing one any way to make changes and get the updation in the existing one.
can I have any doc for the source files on the existing kernel so that i can make the changes and recompile the existing one.
Waiting for the reply
Anup Girdhar


17 r00tcrypt March 24, 2011 at 10:12 am

hello i need some guidance here

i have a RHEL 5.2 (64bit) servers and i want to upgrade the current kernel from kernel-2.6.18-92.el5 to latest release kernel-2.6.18-238.5.1.el5

Is it possible to upgrade only the kernel without updating all the packages installed in the system or dependencies?



18 AVINDO October 1, 2011 at 4:05 am


Where I can get/subscribe Centos/Linux Kernel notification update?

Thanks b4,


19 Andrei December 10, 2011 at 8:31 pm

Thanks, this is very useful!


20 Karel January 31, 2012 at 12:43 pm

On Ubuntu 10.04 I had to use ‘linux-image-generic-lts-backport-maverick’ rather than ‘linux-image-x.x.x-xx’ because the latter wasn’t found, despite being listed in the search. Yes, I did use the correct numbers in place of the ‘x.x.x-xx’.


21 kram June 17, 2012 at 11:40 pm

thanks for the tutorial, just what i was looking for.

ps. an adverisement on this webpage forwarded an attack on my computer, my antivirus detected and blocked it however you may want to address this issue. i hope this doesnt scare anyone away as this could happen to any site with advertisements.

Detected By = Norton 360 v6.0
Description = A Severe Level Intrusion Attempt
IPS Alert Name = Web Attack: Malicious Toolkit Website 14
Attacking Computer = (, 80)
Attacker Url =
Traffic Description = TCP, www-http


22 sj March 19, 2013 at 6:33 am

Hey guys,

I wondering do you have the same material on what you are saying here, that is related to MontaVista Linux. Would be great if you can point me to the materials. Thanks.


23 DP April 29, 2013 at 2:39 pm

Excellent thanks for the guide. I updated from Debian Kirkwood to 2.6.32-5 kirkwood.



Leave a Comment

Tagged as: , , , , , , , , , , ,

Previous Faq:

Next Faq: