How To Update Ubuntu?

How do we update kernel in Ubuntu by command line in terminal?

  • Please provide all required sequence of commands for updating kernel (I dont want to use any UI based software). PS: if possible also share how to do in fedora and opensuse.

  • Answer:

    Assuming an update is available: 12sudo apt-get update sudo apt-get u...

Murukesh Mohanan at Quora Visit the source

Was this solution helpful to you?

Other answers

In Ubuntu, each version comes running linux kernels from a certain tree. For example, Ubuntu 13.04 runs the kernel 3.8 tree, 12.10 runs the 3.5 tree. Now this tree receives security updates as and when they are made available. This is called "backporting". Thereby, the kernel version progress as (for the 3.8 tree): 3.8.1, 3.8.2, ..., 3.8.13 and so on. If you do sudo apt-get update sudo apt-get upgrade your kernel will be upgraded along these lines to the latest update available within the same tree. So you would end up with say kernel 3.8.23. Now, lets say Linus releases 3.10 kernel. Ubuntu doesnt recommend you installing that kernel, simply because they have not tested it extensively themselves yet. But ofcourse, since this is linux, you are free to do whatever you wish to as long as you have root access. So now, you are left with 2 options: Get the sourcecode of the kernel from http://kernel.org, and compile it. Get some precompiled package. 1. To get the code from http://kernel.org you can use: wget https://www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.10-rc7.tar.xz tar xvjf linux-3.10-rc7.tar.xz make menuconfig make && make modules_install make install update-grub and restart your computer. This procedure, will work across all the distributions mentioned. It will be slow though as you will need to download kernel sources (70MB) and compile which is a time consuming process depending on your processor and gcc optimizations. It will also require you to have basic tools like gcc, gnu-make and other essential tools at your behest. 2. Use pre packaged kernel available via ppa: For this, sudo add-apt-repository ppa:kernel-ppa/ppa sudo apt-get update sudo apt-get upgrade should do the task.

Bhaavan Merchant

Follow these steps:  sudo add-apt-repository ppa:kernel-ppa/ppa sudo apt-get update apt-cache showpkg linux-headers sudo apt-get install linux-headers-2.6.39-0 linux-headers-2.6.39-0-generic linux-image-2.6.39-0-generic --fix-missing You can replace 2.6.39-0 with the version you want. Don't forget to restart your system for the changes to take effect.

Raghav Yadav

The http://www.linuxfoundation.org/ releases linux kernel updates. No end user will get their hands directly on the Linux Kernel. The enterprises and the community developers use the linux kernel and patch it with the linux distros. The end user is not allowed to experiment with the kernel unless he's a core linux kernel developer. Doing so just means that he's burning his hands. Only the enterprises and support companies will test the new version of the kernel and will release a distro update. You may and can forcibly install a new kernel on your linux distro but that may break your OS and disturb it's stability. The enterprises will test the new version of the kernel and will notify you to update.The following commands will update your distro which will update your linux kernel:sudo apt-get updatesudo apt-get dist-upgradeOutput:Reading package lists... DoneBuilding dependency tree       Reading state information... DoneCalculating upgrade... The following packages were automatically installed and are no longer required:  bbswitch-dkms lib32gcc1 libc6-i386 libcuda1-340 libjansson4 libxnvctrl0  linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic linux-headers-4.2.0-18  linux-headers-4.2.0-18-generic linux-headers-4.2.0-22  linux-headers-4.2.0-22-generic linux-image-4.2.0-16-generic  linux-image-4.2.0-18-generic linux-image-4.2.0-22-generic  linux-image-extra-4.2.0-16-generic linux-image-extra-4.2.0-18-generic  linux-image-extra-4.2.0-22-generic linux-tools-4.2.0-18  linux-tools-4.2.0-18-generic linux-tools-4.2.0-22  linux-tools-4.2.0-22-generic nvidia-prime nvidia-settings  screen-resolution-extraUse 'apt-get autoremove' to remove them.Done0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.You can see above, the version of the linux kernel, 4.2.0. Check the latest linux kernel versions at: https://www.kernel.org/

Praneeth S. Karnena

If you simply do "sudo apt-get upgrade", Ubuntu by default will *NOT* install kernel upgrades. For that, you have to type "sudo apt-get dist-upgrade". So, the complete command for update will become "sudo apt-get update && dist-upgrade -y" For example, in my system, $ sudo apt-get upgrade Reading package lists... Done Building dependency tree       Reading state information... Done The following packages have been kept back:   linux-headers-generic-lts-trusty linux-image-generic-lts-trusty   linux-signed-image-generic-lts-trusty The following packages will be upgraded:   firefox firefox-locale-en libsnmp-base libsnmp15 linux-generic-lts-trusty   linux-libc-dev linux-signed-generic-lts-trusty openssh-client openssh-server   pepflashplugin-installer r-base r-base-core r-base-dev r-base-html   r-cran-foreign r-cran-nlme r-cran-spatial r-doc-html r-recommended   ssh-askpass-gnome thunderbird thunderbird-gnome-support 22 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. and sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree       Reading state information... Done Calculating upgrade... Done The following NEW packages will be installed:   linux-headers-3.13.0-62 linux-headers-3.13.0-62-generic   linux-image-3.13.0-62-generic linux-signed-image-3.13.0-62-generic The following packages will be upgraded:   firefox firefox-locale-en libsnmp-base libsnmp15 linux-generic-lts-trusty   linux-headers-generic-lts-trusty linux-image-generic-lts-trusty   linux-libc-dev linux-signed-generic-lts-trusty   linux-signed-image-generic-lts-trusty openssh-client openssh-server   pepflashplugin-installer r-base r-base-core r-base-dev r-base-html   r-cran-foreign r-cran-nlme r-cran-spatial r-doc-html r-recommended   ssh-askpass-gnome thunderbird thunderbird-gnome-support 25 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.

Aaruni Kaushik

Simply do: apt-get update && apt-get upgrade -y && apt-get autoremove && apt-get autoclean If there is a kernel update available in the repositories it will automatically install it. the autoremove and autoclean commands are to remove unneccessary packages previously installed. If you have updated the kernel you will be asked to restart the system. In Fedora you can do this to update the kernel yum update kernel

Aswin Kumar

Ubuntu doesn't provide the bleeding edge kernel updates. There are 2 options: 1) use the precompiled binaries provided by ubuntu on a timely basis (assuming your version is still supported ). 2) Pull the latest kernel code (or a older one ) and build the kernel yourself.

Subhendu Malakar

If you wanted  update it a specific version then do sudo apt-cache search linux-imageNow pick the version you wanted and run sudo apt-get install http://linux-image-ve.rs.io-n-generic.Ex: sudo apt-get install  linux-image-3.13.0-74-genericOtherwise just run the following commands which will install the possible latest compatible kernel versionsudo apt-get updatesudo apt-get upgrade

Sugham Dha

The best way is to this is by using the native package manager. If there will be an update for kernel it will get installed when you run apt-get upgrade. But it will upgrade all the packages as well. In order to install just the kernel you need to sue below commands: For Ubuntu: sudo apt-get update sudo apt-get install linux-image-`uname -r` For fedora you will need: yum -y update kernel or yum install kernel-<and the version here> Not much aquainted with Opensuse so can comment on that. Hope this helps.

Jha Saurabh

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.