Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of upgrading the Linux kernel

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "what is the method of upgrading the Linux kernel". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Brief introduction of Linux kernel: 1. Technically speaking, the kernel is an intermediate layer between hardware and software. The function is to pass the request of the application hierarchy to the hardware and act as the underlying driver to address various devices and components in the system. two。 At the application level, the application is not related to the hardware, but only to the kernel, which is the lowest level of the application's knowledge. In practice, the kernel abstracts the relevant details. 3. The kernel is a resource manager. Responsible for allocating available shared resources (CPU time, disk space, network connections, etc.) to each system process.

4. The kernel is like a library that provides a set of system-oriented commands. For an application, a system call is like calling an ordinary function.

What does the kernel look like?

Students with energy can go to study!

Check the current kernel to open the terminal execution:

Vincent@dell-Inspiron-7559 Dir:~ $uname-r 4.15.0-32-generic123 the current kernel is version 4.15. Generally, we upgrade the kernel to a higher version by replacing the kernel.

There are many addresses for downloading the kernel, and I mainly use the following two:

Download linux kernel on github

Download linux kernel from ubuntu's warehouse

Which files does the kernel need to download?

Ubuntu 18.04 already uses version 4.15 kernel, and linux mint 19 also uses version 4.15 kernel.

There is a difference in installation between 4.16 and 4.17 in Generation 4:

Here are the file selections for version 4.16:

Here are the file selections for version 4.17:

The installation sequence is installed in the form of sudo dpkg-I *. Deb.

First install linux-headers-4.17.0-0417004.17.0-041700.201806041953_all.deb

Install linux-headers-4.17.0-041700-generic_4.17.0-041700.201806041953_amd64.deb

Install linux-modules-4.17.0-041700-generic_4.17.0-041700.201806041953_amd64.deb

Install linux-image-unsigned-4.17.0-041700-generic_4.17.0-041700.201806041953_amd64.deb

If it is version 4.16 or earlier, this file is not available and does not need to be installed.

Restart after the installation is complete.

Delete redundant kernel 1. View the kernel installed on the current system

Dpkg-- get-selections | grep linux1 console-setup-linux install libselinux1:amd64 install libselinux1:i386 install linux-base install linux-firmware install linux-generic install linux-headers-4.4.0-22 install linux-headers-4.4.0-22-generic install linux-headers-4.4.0-24 install linux-headers-4.4.0-24-generic install linux-headers-4.4.0-28 install linux-headers-4.4.0-28-generic install linux-headers-4.4. 0-31 install linux-headers-4.4.0-31-generic install linux-headers-4.4.0-34 install linux-headers-4.4.0-34-generic install linux-headers-4.4.0-36 install linux-headers-4.4.0-36-generic install linux-headers-4.4.0-38 install linux-headers-4.4.0-38-generic install linux-headers-4.4.0-42 install linux-headers-4.4.0-42- Generic install linux-headers-generic install linux-image-4.2.0-21-generic deinstall linux-image-4.2.0-22-generic deinstall linux-image-4.4.0-31-generic deinstall linux-image-4.4.0-34-generic install linux-image-4.4.0-36-generic install linux-image-4.4.0-38-generic install linux-image-4.4.0-42-generic install linux-image-extra-4.2.0-21- Generic deinstall linux-image-extra-4.4.0-31-generic deinstall linux-image-extra-4.4.0-34-generic deinstall linux-image-extra-4.4.0-36-generic deinstall linux-image-extra-4.4.0-38-generic install linux-image-extra-4.4.0-42-generic install linux-image-generic install linux-libc-dev:amd64 install linux-sound-base install pptp-linux install syslinux install syslinux-common install syslinux-legacy install util-linux install12345678910111213141516171819202122232425262728293031323334353637383940414243442. Uninstall the kernel

You can see that the system has several kernel versions installed, including headers and image, which can be removed to uninstall the old kernel.

For example, if we delete the 4.4.0-22 kernel, we can see that there is only headers on it, so we can do this:

Sudo apt-get remove-- purge linux-headers-4.4.0-22 sudo apt-get remove-- purge linux-image-4.2.0-22-generic123 and so on.

Then the terminal executes:

This is the end of the content of sudo apt-get autoclean sudo apt-get autoremove12 "what is the method of upgrading the Linux kernel". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report