如何在 Ubuntu 18.04 LTS 中获取 Linux 5.0 内核
内核

> 
> 最近发布的 Ubuntu 18.04.3 包括 Linux 5.0 内核中的几个新功能和改进，但默认情况下没有安装。本教程演示了如何在 Ubuntu 18.04 LTS 中获取 Linux 5 内核。
> 
> 
> 


![](/data/attachment/album/201908/17/101052xday1jyrszbddsfc.jpg)


[Ubuntu 18.04 的第三个“点发布版”已经发布](https://ubuntu.com/blog/enhanced-livepatch-desktop-integration-available-with-ubuntu-18-04-3-lts)，它带来了新的稳定版本的 GNOME 组件、livepatch 桌面集成和内核 5.0。


可是等等！什么是“<ruby> 小数点版本 <rt>  point release </rt></ruby>”？让我先解释一下。


### Ubuntu LTS 小数点版本


Ubuntu 18.04 于 2018 年 4 月发布，由于它是一个长期支持 （LTS） 版本，它将一直支持到 2023 年。从那时起，已经有许多 bug 修复、安全更新和软件升级。如果你今天下载 Ubuntu 18.04，你需要在[在安装 Ubuntu 后首先安装这些更新](https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/)。


当然，这不是一种理想情况。这就是 Ubuntu 提供这些“小数点版本”的原因。点发布版包含所有功能和安全更新以及自 LTS 版本首次发布以来添加的 bug 修复。如果你今天下载 Ubuntu，你会得到 Ubuntu 18.04.3 而不是 Ubuntu 18.04。这节省了在新安装的 Ubuntu 系统上下载和安装数百个更新的麻烦。


好了！现在你知道“小数点版本”的概念了。你如何升级到这些小数点版本？答案很简单。只需要像平时一样[更新你的 Ubuntu 系统](https://itsfoss.com/update-ubuntu/)，这样你将在最新的小数点版本上了。


你可以[查看 Ubuntu 版本](https://itsfoss.com/how-to-know-ubuntu-unity-version/)来了解正在使用的版本。我检查了一下，因为我用的是 Ubuntu 18.04.3，我以为我的内核会是 5。当我[查看 Linux 内核版本](https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/)时，它仍然是基本内核 4.15。


![Ubuntu Version And Linux Kernel Version Check](/data/attachment/album/201908/17/101105c72oh92u9e7zze3f.png)


这是为什么？如果 Ubuntu 18.04.3 有 Linux 5.0 内核，为什么它仍然使用 Linux 4.15 内核？这是因为你必须通过选择 LTS <ruby> 支持栈 <rt>  Enablement Stack </rt></ruby>（通常称为 HWE）手动请求在 Ubuntu LTS 中安装新内核。


### 使用 HWE 在Ubuntu 18.04 中获取 Linux 5.0 内核


默认情况下，Ubuntu LTS 将保持在最初发布的 Linux 内核上。<ruby> <a href="https://wiki.ubuntu.com/Kernel/LTSEnablementStack">  硬件支持栈 </a> <rt>  hardware enablement stack </rt></ruby>（HWE）为现有的 Ubuntu LTS 版本提供了更新的内核和 xorg 支持。


最近发生了一些变化。如果你下载了 Ubuntu 18.04.2 或更新的桌面版本，那么就会为你启用 HWE，默认情况下你将获得新内核以及常规更新。


对于服务器版本以及下载了 18.04 和 18.04.1 的人员，你需要安装 HWE 内核。完成后，你将获得 Ubuntu 提供的更新的 LTS 版本内核。


要在 Ubuntu 桌面上安装 HWE 内核以及更新的 xorg，你可以在终端中使用此命令：



```
sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
```

如果你使用的是 Ubuntu 服务器版，那么就不会有 xorg 选项。所以只需在 Ubutnu 服务器版中安装 HWE 内核：



```
sudo apt-get install --install-recommends linux-generic-hwe-18.04
```

完成 HWE 内核的安装后，重启系统。现在你应该拥有更新的 Linux 内核了。


### 你在 Ubuntu 18.04 中获取 5.0 内核了么？


请注意，下载并安装了 Ubuntu 18.04.2 的用户已经启用了 HWE。所以这些用户将能轻松获取 5.0 内核。


在 Ubuntu 中启用 HWE 内核遇到困难了么？这完全取决于你。[Linux 5.0 内核](https://itsfoss.com/linux-kernel-5/)有几项性能改进和更好的硬件支持。你将从新内核获益。


你怎么看？你会安装 5.0 内核还是宁愿留在 4.15 内核上？




---


via: <https://itsfoss.com/ubuntu-hwe-kernel/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
*The recently released Ubuntu 18.04.3 includes Linux Kernel 5.0 among several new features and improvements but you won’t get it by default. This tutorial demonstrates how to get Linux Kernel 5 in Ubuntu 18.04 LTS.*

The [third point release of Ubuntu 18.04 is here](https://ubuntu.com/blog/enhanced-livepatch-desktop-integration-available-with-ubuntu-18-04-3-lts) and it brings new stable versions of GNOME component, livepatch desktop integration and kernel 5.0.

But wait! What is a point release? Let me explain it to you first.

## Ubuntu LTS point release

Ubuntu 18.04 was released in April 2018 and since it’s a long term support (LTS) release, it will be supported till 2023. There have been a number of bug fixes, security updates and software upgrades since then. If you download Ubuntu 18.04 today, you’ll have to install all those updates as one of the first [things to do after installing Ubuntu 18.04](https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/).

That, of course, is not an ideal situation. This is why Ubuntu provides these “point releases”. A point release consists of all the feature and security updates along with the bug fixes that has been added since the initial release of the LTS version. If you download Ubuntu today, you’ll get Ubuntu 18.04.3 instead of Ubuntu 18.04. This saves the trouble of downloading and installing hundreds of updates on a newly installed Ubuntu system.

Okay! So now you know the concept of point release. How do you upgrade to these point releases? The answer is simple. Just [update your Ubuntu system](https://itsfoss.com/update-ubuntu/) like you normally do and you’ll be already on the latest point release.

You can [check Ubuntu version](https://itsfoss.com/how-to-know-ubuntu-unity-version/) to see which point release you are using. I did a check and since I was on Ubuntu 18.04.3, I assumed that I would have gotten Linux kernel 5 as well. When I [check the Linux kernel version](https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/), it was still the base kernel 4.15.

![Ubuntu Version And Kernel Version Check](https://itsfoss.com/content/images/wordpress/2019/08/ubuntu-version-and-kernel-version-check-800x300.png)

Why is that? If Ubuntu 18.04.3 has Linux kernel 5.0 then why does it still have Linux Kernel 4.15? It’s because you have to manually ask for installing the new kernel in Ubuntu LTS by opting for LTS Enablement Stack popularly known as HWE.

## Get Linux Kernel 5.0 in Ubuntu 18.04 with Hardware Enablement Stack

By default, Ubuntu LTS release stay on the same Linux kernel they were released with. The [hardware enablement stack](https://wiki.ubuntu.com/Kernel/LTSEnablementStack) (HWE) provides newer kernel and xorg support for existing Ubuntu LTS release.

Things have been changed recently. If you downloaded Ubuntu 18.04.2 or newer desktop version, HWE is enabled for you and you’ll get the new kernel along with the regular updates by default.

For server versions and people who downloaded 18.04 and 18.04.1, you’ll have to install the HWE kernel. Once you do that, you’ll get the newer kernel releases provided by Ubuntu to the LTS version.

To install HWE kernel in Ubuntu desktop along with newer xorg, you can use this command in the terminal:

`sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04`


If you are using Ubuntu Server edition, you won’t have the xorg option. So just install the HWE kernel in Ubutnu server:

`sudo apt-get install --install-recommends linux-generic-hwe-18.04`


Once you finish installing the HWE kernel, restart your system. Now you should have the newer Linux kernel.

**Are you getting kernel 5.0 in Ubuntu 18.04?**

Do note that HWE is enabled for people who downloaded and installed Ubuntu 18.04.2. So these users will get Kernel 5.0 without any trouble.

Should you go by the trouble of enabling HWE kernel in Ubuntu? It’s entirely up to you. [Linux Kernel 5.0](https://itsfoss.com/linux-kernel-5/) has several performance improvement and better hardware support. You’ll get the benefit of the new kernel.

What do you think? Will you install kernel 5.0 or will you rather stay on the kernel 4.15?