How to Easily Upgrade Ubuntu’s Linux Kernel With Ukuu
Manually upgrading the Linux kernel is not a simple feat — it requires a fair amount of knowledge. We’ve covered how to do it before , but if you’d rather get the latest and greatest without the fuss, and you’re running Ubuntu, you might appreciate a more automatic solution in the form of Ukuu.
What Is a Kernel?
The kernel is basically an important piece of software found in every operating system. It acts as a mediator between the software you run every day (e.g. web browsers), and the hardware that it’s running on. Essentially, without a kernel, other programs cannot function since they can’t access your computer’s resources.
For example, open up your task manager. All of your processes take up some amount of your computer’s memory. It is the operating system’s kernel that is quietly allocating this memory to your programs.
Different operating systems have different kernels. For Linux users, this means using operating systems built upon the Linux kernel. Other examples include the NT kernel (Windows) and the XNU kernel (Mac).
Why Should I Upgrade My Kernel?
Since the kernel is essentially the go-between for your programs and the hardware it’s running on, updates can provide a myriad of benefits. Two examples of these include better support for your computer system, and improved performance .
Part of the Linux kernel is devoted solely to controlling things like your graphics card and CPU in the form of device drivers. These drivers inside the kernel tend to be limited to a particular range of hardware. With newer and newer technologies coming out, drivers need to be constantly added and updated to match them. If you’re using a partially unsupported computer, upgrading the kernel may help it become more compatible.
Along with this, system performance can go hand-in-hand with better drivers. Your graphics performance in particular get almost constant improvements per release. Just don’t expect miracles!
Unfortunately, the process of upgrading a kernel by hand can be a little tedious, and that’s where Ukuu comes in.
What Is Ukuu?
Ukuu (short for Ubuntu Kernel Update Utility) makes updating your Ubuntu kernel much easier to perform. It downloads newer kernels from the internet, and changes your system to let it use them. All you really have to do is choose which kernel you’d like and reboot into it.
Traditionally, updating your kernel means installing a new copy of Ubuntu over your old Linux box. If you repeat your installation experience a couple of times, you’ll see how it can eat up some time. Ukuu makes this process as easy as installing a program from the Ubuntu Software Center.
Enter these commands in the terminal to install Ukuu:
sudo apt-add-repository -y ppa:teejee2008/ppa
You can’t get Ukuu by default from the list of software that Ubuntu provides. As such, using the above command, we point our package manager to the desired repository. Adding such locations lets us install software that Ubuntu doesn’t have by default (such as Ukuu).
sudo apt-get update
Package managers (such as APT), work by retrieving a list of all the software that they can install. The second command ensures that this list is up to date. Put shortly, if you don’t enter this command, you won’t be able to find Ukuu!
sudo apt-get install ukuu
The above command actually downloads and installs the program. Alternatively, you could open the Ubuntu Software Center , and install Ukuu from there. After all that, launch the program using the command below.
You can also open Ukuu by searching for it in Dash.
Installing a Kernel With Ukuu
Ukuu will present the newest kernels at the top of the window. You’ll also be able to see what kernel version you’re running, so you don’t have to worry about checking it elsewhere. After selecting your desired kernel version, click on the install button to start the process.
The terminal window you’ll see shows the kernel installation process. Make sure you know your administrator password — you might have to enter it in!
Once you reboot your computer, congratulations! You’ve just updated the kernel.
Downgrading the Kernel
You may encounter a few problems if you upgrade your kernel to the bleeding edge. For example, when I upgraded it to the latest version (4.9), my wireless connection stopped working. However, unless you rely on proprietary drivers like my laptop, this is unlikely to happen.
Even if you don’t encounter any problems, it’s good to know how to downgrade to your previous kernel just in case. By default, Ubuntu does not give you the ability to choose which kernel you’d like to boot from. We can rectify this by editing this file:
sudo nano /etc/default/grub
Once you’re inside the file, add a # in front of the GRUB_HIDDEN_TIMEOUT and GRUB_HIDDEN_TIMEOUT_QUIET entries. Next, press Ctrl + X to save your changes. To make these changes actually do something however, you need to enter this command:
sudo grub-mkconfig -o /boot/grub/grub.cfg
When you reboot your computer, you’ll see a boot menu. Using the arrow keys, you can navigate to the Advanced options for Ubuntu entry. Select this to see the list of installed kernels you can boot into.
I strongly recommend doing this if you’re interested in getting the latest version of the Linux kernel. It’ll definitely make accidental mistakes much easier to fix.
Once you’ve booted into your upgraded (or downgraded) Linux box, and made sure that everything works, feel free to remove any leftover kernels for some extra space . Simply open up Ukuu and hit the Remove button.
Afterwards, run this command to clean up any remaining empty boot options:
sudo grub-mkconfig -o /boot/grub/grub.cfg
With that all done, enjoy your new and improved kernel!
What other Linux utilities do you love to use? Any ones that you’d like to have but don’t exist?
Image Credit: Rawpixel.com via Shutterstock