Howto: Upgrade Linux Kernel

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

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 23 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
23 comments… add one
  • Thilak Apr 19, 2007 @ 16:48


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

    Thanks in advance.

    • MP Jul 26, 2011 @ 16:40

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

  • Bernard Hines May 1, 2007 @ 15:52

    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?

  • 🐧 nixCraft May 1, 2007 @ 17:13

    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.

  • Hossam Hammady Mar 10, 2009 @ 11:37

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

  • Santosh singh rawal May 9, 2009 @ 13:51

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

  • manoj jasawat Jul 10, 2009 @ 11:03

    how to configure virtual server at RHEL5.

  • Philippe Petrinko Oct 22, 2009 @ 11:45

    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

  • 🐧 nixCraft Oct 22, 2009 @ 12:39

    @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!

  • Ahmed May 12, 2010 @ 20:16

    Well that helped me tho

  • tsog Jun 18, 2010 @ 3:59

    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.

  • Anton Jul 31, 2010 @ 11:43

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

  • Rishabh Dangwal Sep 2, 2010 @ 17:51

    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 ?

  • Stefan Lasiewski Sep 21, 2010 @ 23:44

    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.

  • anupgirdhar Oct 5, 2010 @ 16:34

    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

  • r00tcrypt Mar 24, 2011 @ 10:12

    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?


  • AVINDO Oct 1, 2011 @ 4:05


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

    Thanks b4,

  • Andrei Dec 10, 2011 @ 20:31

    Thanks, this is very useful!

  • Karel Jan 31, 2012 @ 12:43

    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’.

  • kram Jun 17, 2012 @ 23:40

    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

  • sj Mar 19, 2013 @ 6:33

    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.

  • DP Apr 29, 2013 @ 14:39

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


Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum