Команда обновления ядра linux

Check and Update Ubuntu Kernel Version on Ubuntu 20.04

The Linux kernel is the core of the Linux OS. It is responsible for interfacing the computer hardware and software applications in this operating system. Like the continual updates to Linux OS and applications, new versions of Linux kernel will also be released. It is recommended to update the kernel version to have the latest functionalities, improved stability, and security fixes.In this article, we will explain three ways by which you might update your Linux kernel to the latest available version. We have explained the procedure on Ubuntu 20.04 LTS, which comes with kernel version 5.4. More or less the same procedure can be followed using previous versions of Ubuntu OS.

Check Current Kernel Version

Before updating the kernel version, it is better to check the current version. It will help you to decide which new version to update the kernel to. Open the command line by using the Ctrl+Alt+T keyboard shortcut.

Now, check the current kernel version directly from the command line, as follows:

You can also check the kernel version with the following command:

Using either of the above commands will show you the kernel version of your OS. From the above output, you can see that the kernel version used in this article is 5.4.0-28-generic.

Update Ubuntu Kernel Version via Command Line

In the following methods, I will show you how to update the kernel version using the Command line.

Method # 1: Ubuntu Kernel Team Site

In the following method, we will update the kernel version by first downloading the latest version from the Ubuntu kernel team site and then installing it.

For this method, follow these steps to update the kernel version:

  1. Open the Ubuntu kernel team site to download the latest Linux kernel for Ubuntu. Select the version you wish to download and then download the .deb files for the generic version.
  • linux-headers—all.deb
  • linux-mage-unsigned—amd64.deb
  • linux-modules—amd64.deb

We want to update our kernel to latest stable kernel version 5.6.10. So, we have downloaded the following .deb files.

Alternatively, you can use the wget command to download the following mainline packages for kernel version 5.6.10:

$ wget https: // kernel.ubuntu.com / ~kernel-ppa / mainline / v5.6.10 / linux-headers-
5.6.10-050610_5.6.10- 050610.202005052301 _all.deb
$ wget https: // kernel.ubuntu.com / ~kernel-ppa / mainline / v5.6.10 / linux-image-unsigned-
5.6.10-050610-generic_5.6.10- 050610.202005052301 _amd64.deb
$ wget https: // kernel.ubuntu.com / ~kernel-ppa / mainline / v5.6.10 / linux-modules-5.6.10-
050610-generic_5.6.10- 050610.202005052301 _amd64.deb

  1. Once all packages are downloaded, you can verify them using the “ls –l” command:
  2. The next step is to install all the downloaded packages. If you have downloaded the files on a directory other than the Home directory, then first navigate to it using the cd command:
Читайте также:  Linux set path at boot

Wait for a while until installation of all packages is complete.

  1. Reboot your system. Once the reboot is completed, log in to your system and check the kernel version with the uname command, as follows:

The output will show the updated kernel version that is 5.6.10.

Method # 2: Using the Bash Script

In the next method, we will use the bash script in order to install a new kernel version. Follow these simple steps to do so:

1. Download the bash script using the following command:

$ wget https: // raw.githubusercontent.com / pimlie / ubuntu-mainline-kernel.sh /
master / ubuntu-mainline-kernel.sh

2. Copy the script to the “/usr/local/bin/” directory. You can do so with the following command:

3. Now, you can update the kernel version as follows:

It will search for and provide you with the latest kernel version number, e.g. v5.6.10, in the following output. If you want to install this version, hit B, upon which the installation will begin.

Once installed, reboot the system. Then, check the kernel version with the uname command as follows:

The output will show the updated kernel version

Method # 3: Update Ubuntu Kernel Version via GUI

In the following method, we will discuss the GUI method to update the Linux kernel. We will use the graphical Mainline tool for installing the latest version of the kernel. Here are the simple steps to do so:

1. The Mainline tool is not available in official Ubuntu repositories, so we will need to manually add its PPA to the sources.list file in our system. Use the apt-add-repository command for this purpose:

2. Once you have added the mainline repository, the following step is to update the system’s repository index:

3. Next, install the Mainline tool with this command:

The system might ask for confirmation by providing you with a Y/N option. Hit Y to continue, after which the Mainline tool will be installed on your system.

4. Launch the mainline tool from the Ubuntu search bar as follows:

5. When the Mainline tool is launched, you will see the following installer window with a list of new and available kernel versions. You may install a new version by selecting the version from the list and clicking the Install button on the bar to the right.

After this step, the following Authentication dialog will appear. Enter the super user password and click the Authenticate button.

The installation of the selected kernel version will begin, and you will be able to see the installation process in a new window.

Now, reboot your system and verify the new kernel version:

In this article, we have explained three different methods to update the kernel version on Ubuntu 20.04 LTS. After updating the kernel, sometimes you may face issues in booting the system. In this case, switch back to the old kernel by hitting the Shift key at boot, and select the older version from the list.

About the author

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.

Источник

How to Update Linux Kernel In Ubuntu

The Linux kernel is like the central core of the operating system. It works as sort of a mediator, providing an interface between software applications and computer hardware.

Читайте также:  Astra linux заблокирован администратор

The Linux kernel is the foundation on which all the different types of Linux, operate. It is Open Source software – anyone can decompile, examine, and modify the code.

As technology progresses, developers discover patches and updates to the Linux kernel. These patches can improve security, add functionality, or even improve the speed at which the operating system functions.

If you’re running a Linux operating system (like Ubuntu), it’s a good idea to check and update the kernel regularly.

update linux kernel in ubuntu

  • A server running Ubuntu Linux
  • Access to the Terminal (CTRL-ALT-T or Applications menu > Accessories > Terminal)
  • A user account with sudo privileges
  • The apt tool, built into Ubuntu
  • The Update Manager, built into Ubuntu (optional)

Tutorial on Updating Ubuntu Kernel

Option A: Use the System Update Process

Step 1: Check Your Current Kernel Version

At a terminal window, type:

The terminal returns an output similar to:

The first two digits (in this case, 4.4) are the overall kernel package. The third digit is the version, and the fourth digit shows you the level of patches and fixes.

For more details, refer to our full guide on checking the Linux kernel version. While inspecting the system, you can also check which version of Ubuntu you are running.

Step 2: Update the Repositories

sudo apt-get update output

This command refreshes your local list of software, making a note of any newer revisions and updates. If there’s a newer version of the kernel, the command will find it and mark it for download and installation.

Step 3: Run the upgrade

While still in the terminal, type:

The “dist-upgrade” switch asks Ubuntu to handle any dependencies intelligently. That is, if a particular software package is dependent on another software package to run, this command will make sure that the second package is upgraded before upgrading the first one.

This method is a safe way to upgrade your Ubuntu Linux kernel. The kernel updates accessible through this utility have been tested and verified to work with your version of Ubuntu.

Option B: Use the System Update Process to Force a Kernal Upgrade

There are instances in which a newer kernel has been released but not thoroughly tested with your version of Ubuntu. For example, you might be running Ubuntu 17.10 (Artful Aardvark), and you know that Ubuntu 18.04 (Bionic Beaver) is available.

Updating the kernel in this way requires a more substantial process.

Step 1: Back Up Your Important Files

You’ve probably already done this, but it’s important enough that it’s worth repeating.

Step 2: Use the Software Updater

Launch the software updater by hitting the super key (the “windows” key on most keyboards), and search for Update Manager.

The update manager will notify you if there are any updates needed. If you performed the steps in Part A, it should say your computer is up to date.

Click the Settings button.

A new window should open up with several tabs.

Step 3: Configure the Software Updater

Click the Updates tab.

Tick the first three checkboxes, under “Install updates from:”

Then, at the bottom of this tab, look for a drop-down labeled “Notify me of a new Ubuntu version:”

Click that drop-down, and select:

  • For long-term support versions (If you want to stick with tested and reliable versions with full support)
  • For any new version (If you like playing with the latest-and-greatest, and don’t mind if things are a little buggy)
Читайте также:  Add remove software linux

Close this window, and then re-open it. It should offer the option to upgrade if there’s a new version out. (It usually takes a few days after release for the upgrade to become available, and for the server traffic to lighten up.)

Step 4: Force the Upgrade

If for some reason the system does not offer an upgrade, you can force it by opening a terminal and typing:

update manager force output

The system should respond with a window showing release notes for the new kernel (and version) of Ubuntu.

If everything looks good, click upgrade, and the process will proceed.

Option C: Manually Update the Kernel (Advanced Procedure)

If you just want to upgrade to the latest (untested) kernel available, and you’re aware of the risks, there’s a third procedure for selecting and installing a new kernel.

Before performing this step, it’s worth checking your system configuration. Are you running any custom drivers (especially video drivers)? Any custom configurations or packages? Those may not be compatible with the new kernel.

If you make a mistake and find that the new kernel is incompatible, a recovery option should be available. But it’s better to take precautions and prevent a problem than to try to fix one.

It’s also a good idea to research the release notes for the kernel you want to install. Note the revision number and any features that you intend to work with.

This process will use Ukuu, a graphical utility for updating the kernel. There are other methods, including manually downloading and installing the kernel, or even getting a copy of the source code and compiling it. Those methods are more complicated, and outside the scope of this guide.

Step 1: Install Ukuu

At the terminal, type the following (hit enter after each line):

sudo apt-add-repository ppa:teejee2008/ppa

The first command adds the TeeJeeTech repositories of open-source software for Linux to your basic repositories. The second command refreshes the database, so you’ve got a list of the latest revisions. The third command installs the Ukuu software.

Step 2: Launch Ukuu

The Ukuu utility will launch and should display a list of the available Linux kernel versions.

Step 3: Install the Kernel

Select the kernel you wish to install, then click the “Install” button on the right-hand side.

Step 4: Reboot the System

Once the kernel finishes installing, reboot your system. Once you’re back into the operating system, you can relaunch Ukuu to verify the installation.

Step 5: In Case of Failure

If there’s a catastrophic problem, the GRUB, or boot utility, will keep a copy of the old kernel that you can select and boot into.

On the boot screen, select Advanced options for Ubuntu – then select the previous kernel (identified by the revision number). There’s no need to use the “upstart” or “recovery mode” options.

Step 6: Uninstalling the Kernel

The Ukuu utility also offers the ability to remove old kernels on Ubuntu. Simply click the same kernel that you installed previously, and click Remove on the right-hand side.

For most users, upgrading the kernel in Ubuntu is pretty straightforward. Most systems will prompt when the upgrade is ready. But if you’re looking for a custom kernel, or want to override the automatic process, this guide provides a good foundation for doing so.

Источник

Оцените статью
Adblock
detector