{"id":5233,"date":"2015-08-27T15:04:11","date_gmt":"2015-08-27T15:04:11","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=5233"},"modified":"2015-08-27T15:04:11","modified_gmt":"2015-08-27T15:04:11","slug":"install-latest-kernel-script","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2015\/08\/install-latest-kernel-script\/","title":{"rendered":"Install The Latest Linux Kernel in Ubuntu Easily via A Script"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/12\/linux-kernel-icon-tux.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/12\/linux-kernel-icon-tux.png\" alt=\"upgrade Linux Kernel\" width=\"245\" height=\"245\" class=\"aligncenter size-full wp-image-4345\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/12\/linux-kernel-icon-tux.png 245w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/12\/linux-kernel-icon-tux-150x150.png 150w\" sizes=\"auto, (max-width: 245px) 100vw, 245px\" \/><\/a><\/p>\n<p>Want to install the latest Linux Kernel? A simple script can always do the job and make things easier in Ubuntu.<\/p>\n<p>Michael Murphy has created a script makes installing the latest RC, stable, or lowlatency Kernel easier in Ubuntu. The script asks some questions and automatically downloads and installs the latest Kernel packages from <a href=\"http:\/\/kernel.ubuntu.com\/~kernel-ppa\/mainline\/\" target=\"_blank\">Ubuntu kernel mainline page<\/a>.<\/p>\n<p><b>Install \/ Upgrade Linux Kernel via the Script:<\/b><\/p>\n<p>1. Download the script from the right sidebar of the <a href=\"https:\/\/gist.github.com\/mmstick\/8493727\" target=\"_blank\">github page<\/a> (click the &#8220;Download Zip&#8221; button).<\/p>\n<p>2. Decompress the Zip archive by right-clicking on it in your user Downloads folder and select &#8220;Extract Here&#8221;.<\/p>\n<p>3. Navigate to the result folder in terminal by right-clicking on that folder and select &#8220;Open in Terminal&#8221;:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/open-terminal.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/open-terminal-450x289.jpg\" alt=\"open-terminal\" width=\"450\" height=\"289\" class=\"aligncenter size-medium wp-image-5236\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/open-terminal-450x289.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/open-terminal-600x385.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/open-terminal.jpg 943w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>It opens a terminal window and automatically navigates into the result folder. If you <b>DON&#8217;T<\/b> find the &#8220;Open in Terminal&#8221; option, search for and install <code>nautilus-open-terminal<\/code> in Ubuntu Software Center and then log out and back in (or run <code>nautilus -q<\/code> command in terminal instead to apply changes).<\/p>\n<p>4. When you&#8217;re in terminal, give the script executable permission for once.<\/p>\n<pre style=\"border:none;\">chmod +x *<\/pre>\n<p>FINALLY run the script every time you want to install \/ upgrade Linux Kernel in Ubuntu:<\/p>\n<pre style=\"border:none;\">.\/*<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/run-script.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/run-script-600x172.jpg\" alt=\"run-script\" width=\"600\" height=\"172\" class=\"aligncenter size-large wp-image-5237\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/run-script-600x172.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/run-script-450x129.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/run-script.jpg 1018w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>I use * instead of the SCRIPT NAME in both commands since it&#8217;s the only file in that folder.<\/p>\n<p>If the script runs successfully, restart your computer when done.<\/p>\n<p><b>Revert back and Uninstall the new Kernel:<\/b><\/p>\n<p>To revert back and remove the new kernel for any reason, restart your computer and select boot with the old kernel entry under <u>Advanced Options<\/u> menu when you&#8217;re at Grub boot-loader.<\/p>\n<p>When it boots up, see below section.<\/p>\n<p><b>How to Remove the old (or new) Kernels:<\/b><\/p>\n<p>1. Install <u>Synaptic Package Manager<\/u> from Ubuntu Software Center.<\/p>\n<p>2. Launch Synaptic Package Manager and do: <\/p>\n<ul>\n<li>click the <u>Reload<\/u> button in case you want to remove the new kernel.<\/li>\n<li>select <u>Status -> Installed<\/u> on the left pane to make search list clear.<\/li>\n<li>search <u>linux-image-<\/u> using Quick filter box.<\/li>\n<li>select a kernel image &#8220;linux-image-x.xx.xx-generic&#8221; and mark for (complete) removal<\/li>\n<li>finally apply changes<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-old-kernel1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-old-kernel1-600x333.jpg\" alt=\"remove-old-kernel1\" width=\"600\" height=\"333\" class=\"aligncenter size-large wp-image-5239\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-old-kernel1-600x333.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-old-kernel1-450x250.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-old-kernel1.jpg 1159w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Repeat until you removed all unwanted kernels. DON&#8217;T carelessly remove the current running kernel, check it out via <code>uname -r<\/code> (see below pic.) command.<\/p>\n<p>For Ubuntu Server, you may run below commands one by one:<\/p>\n<pre style=\"border:none;\">uname -r\n\ndpkg -l | grep linux-image-\n\nsudo apt-get autoremove KERNEL_IMAGE_NAME<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-kernel-terminal.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-kernel-terminal-600x186.jpg\" alt=\"remove-kernel-terminal\" width=\"600\" height=\"186\" class=\"aligncenter size-large wp-image-5240\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-kernel-terminal-600x186.jpg 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-kernel-terminal-450x140.jpg 450w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2015\/08\/remove-kernel-terminal.jpg 969w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Want to install the latest Linux Kernel? A simple script can always do the job and make things easier in Ubuntu. Michael Murphy has created a script makes installing the latest RC, stable, or lowlatency Kernel easier in Ubuntu. The script asks some questions and automatically downloads and installs the latest Kernel packages from Ubuntu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[14],"class_list":["post-5233","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-linux-kernel"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/5233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=5233"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/5233\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=5233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=5233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=5233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}