How to update the Linux kernel to improve system performance
The development speed of the current Linux kernel is unprecedented. A major version is released every two to three months. Each Release brings several new features and improvements, which can make the processing experience of many people faster, more efficient, or other aspects better.
The problem is that you cannot use these kernels when they are released. You have to wait until your release releases bring new kernels. We previously talked about the benefits of regularly updating the kernel, so you don't have to wait until then. Let's show you how to do this.
Disclaimer: as we have mentioned in some previous articles, upgrading the kernel may cause (very small) risks that may damage your system. In this case, you can use the old kernel to keep the system running, but sometimes it still does not work. Therefore, we are not responsible for any damage to the system. You have to take the risk on your own!
Preparations
To update your kernel, you must first determine whether you are using a 32-bit or 64-bit system. Open the terminal and run:
uname -a
Check whether the output is x86_64 or i686. For x86_64, run the 64-bit version. Otherwise, run the 32-bit version. It is important to remember this.
Next, visit the official Linux kernel website, which will tell you the current stable kernel version. If you like, you can try to release the pre-selected version (RC), but this is much less than the stable version. Unless you are sure you want to release the pre-selected version, use the stable kernel.
Ubuntu Guide
It is very easy for Ubuntu and its derivative version users to upgrade the kernel. Thanks to the main Ubuntu kernel PPA. Although it is officially called PPA, you cannot add it to your software source list like other PPA and expect it to automatically upgrade your kernel. In fact, it is just a simple web page. You should browse and download it to the desired kernel.
Now, visit the kernel PPA page and scroll to the bottom. The bottom of the list contains the latest pre-selected version (you can see "rc" in the name ), but we can see the latest stable version above (more clearly, the latest stable version is 4.1.2 in this article. LCTT Note: Although 4.1.2 was the stable version at the time, the folder name is "-unstable" because it has not yet entered the Ubuntu release version "). Click the folder name and you will see several options. You need to download three files and save them to their own folders (you can put them in the download folder if you like) so that they are isolated from other files:
- Header files containing "generic" (general) for the architecture (I am here 64-bit, that is, "amd64 ")
- Put it in the middle of the list, with the header file "all" at the end of the file name
- Kernel files containing "generic" for the architecture (I will use "amd64" again, but if you use 32-bit, you need to use "i686 ")
You can also see the file containing "lowlatency" (low latency) below. But it is better to ignore them. These files are relatively unstable and only prepared for those general files that cannot meet the needs of tasks such as audio recording that require low latency. Again, the general edition is preferred unless you have specific task requirements that cannot be well met. General games and web browsing are not an excuse to use the low-latency version.
You put them in their respective folders, right? Open the terminal now and usecdCommand to switch to the new folder, as shown in figure
cd /home/user/Downloads/Kernel
Run:
sudo dpkg -i *.deb
This command will mark all the ". deb" files in the folder as "to be installed" and then execute the installation. This is a recommended installation method, because you cannot simply select a file for installation, and it always reports dependency problems. In this way, the installation can avoid this problem. If you do not knowcdAndsudoWhat is it. Let's take a quick look at the usage of the basic Linux Command-sudo command.
After the installation is complete, restart your system, and then the newly installed kernel will run! You can useuname -aTo check the output.
Fedora Guide
If you are using Fedora or its derivative version, the process is similar to Ubuntu. The difference is that the file is obtained in different locations, and the installation commands are also different.
View the latest Fedora kernel build list. Select the latest stable version from the list and click i686 or x86_64. It depends on your system architecture. In this case, you need to download the following files and save them to their corresponding directories (for example, "Kernel" to the download directory ):
- Kernel
- Kernel-core
- Kernel-headers
- Kernel-modules
- Kernel-modules-extra
- Kernel-tools
- Perf and python-perf (optional)
If your system is i686 (32-bit) and you have 4 GB or larger memory, you need to download the PAE versions of all these files. PAE is an address extension technology for 32-bit systems. It allows you to use more than 3 GB of memory.
Use nowcdCommand to enter the folder, such
cd /home/user/Downloads/Kernel
Run the following command to install all the files.
yum --nogpgcheck localinstall *.rpm
Restart your system so that you can run the new kernel!
Use Rawhide
Another solution is that Fedora users can switch to Rawhide, which automatically updates all packages to the latest version, including the kernel. However, Rawhide often destroys the system (especially in early stages of development) and should not be used in your daily system.
Arch Guide
Arch users should always use the latest and best stable version (or a very close version ). If you want to get closer to the latest stable version, you can enable the test library to get major updates two to three weeks in advance.
To do this, use your favorite editorsudoPermission to open the following files
/etc/pacman.conf
Then, uncomment the three rows with testing (# before deleting the row ). If you enable the multilib repository, you can also perform multilib-testing. For more information, see the Arch wiki interface.
Upgrading the kernel is not simple (intended), but it will bring you many benefits. As long as your new kernel won't break anything, you can enjoy the performance improvement, better efficiency, more hardware support and potential new features it brings. When you are using relatively new hardware, upgrading the kernel can help you.
How can I upgrade the kernel? What do you think is the kernel publishing policy of your favorite release ?. Let us know in the comment bar!
How to install Kernel 4.0.2 on CentOS 7
How to install Linux Kernel 4.0 on CentOS 7
How to install Linux kernel 4.0 on Ubuntu/CentOS?
How to install Linux kernel 13.10 On Ubuntu 3.12
How to install the 3.16.7 CKT2 kernel in Ubuntu 14.10, Ubuntu 14.04, and its derivative versions
Linux Kernel: click here
Linux Kernel: click here
Via: How to Update Linux Kernel for Improved System Performance
Author: Danny Stieben Translator: geekpi Proofreader: wxy
This article was originally translated by LCTT and launched with the Linux honor in China
This article permanently updates the link address: