如何从命令行中找到Ubuntu支持的持续时间

时间:2020-03-21 11:44:29  来源:igfitidea点击:

我们可能已经知道,Ubuntu的母Canonical每六个月(四月和十月)发布Ubuntu桌面和服务器版本的新版本。
每两年一次,4月发行的Ubuntu版本就是长期支持(简称LTS)版本。
LTS版本将获得为期五年的支持,而非LTS版本将仅获得9个月的支持。
最新可用的非LTS版本是Ubuntu 19.10(于2019年10月发布),LTS版本是Ubuntu 18.04,其于2016年4月发布。
我们可以从Ubuntu官方版本中找到所有Ubuntu版本的列表及其支持期。
页。

但是,我们知道我们无需参考官方就能找到Ubuntu支持期限吗?
如果我们还不了解,这里有个简单的提示。

有一个名为“ ubuntu-support-status”的命令,它告诉我们Ubuntu发行版的实际支持期限。
我们无需访问Ubuntu或者任何其他。
我们可以从终端本身找到将已安装的Ubuntu发行版支持多长时间。
ubuntu-support-status命令将分析Ubuntu系统并列出以下详细信息:

  • 支持的软件包总数以及将支持多长时间。
  • 不支持的软件包总数和支持期限。
  • 无法下载的软件包总数。
  • 不再可供下载的软件包总数。
  • 是否支持硬件启用堆栈(HWE)及其支持期限。

在命令行中找到Ubuntu支持的持续时间

要了解Ubuntu系统上已安装的所有支持的支持持续时间,只需运行:

$ubuntu-support-status

我的Ubuntu 18.04 LTS服务器版本的输出示例:

Support status summary of 'ubuntuserver':
You have 514 packages (100.0%) supported until April 2023 (Canonical - 5y)
You have 0 packages (0.0%) that can not/no-longer be downloaded
You have 0 packages (0.0%) that are unsupported
Run with --show-unsupported, --show-supported or --show-all to see more details

从上面的输出中可以看到,我的Ubuntu服务器总共安装了514个软件包。
而且都不支持任何软件包。
意味着所有软件包将在2023年4月之前收到错误修复,安全更新和功能更新。
如上所述,Ubuntu 18.04于2016年4月发布,它将在未来五年内受支持,例如:2023年4月。

Ubuntu 18.04桌面版的输出示例:

Support status summary of 'theitroad':
You have 1691 packages (82.6%) supported until April 2023 (Canonical - 5y)
You have 271 packages (13.2%) supported until April 2021 (Community - 3y)
You have 3 packages (0.1%) supported until April 2021 (Canonical - 3y)
You have 0 packages (0.0%) that can not/no-longer be downloaded
You have 83 packages (4.1%) that are unsupported
Your Hardware Enablement Stack (HWE) is supported until April 2023.
Run with --show-unsupported, --show-supported or --show-all to see more details

如我们在上面的输出中看到的,

  • 在2023年4月之前,将支持1691个软件包,
  • 到2021年4月,支持271个软件包,
  • 在2021年4月之前,支持3个软件包,
  • 0个软件包不能或者不再可以下载,
  • 不支持83个软件包。

我们可以使用以下命令缩小结果范围以仅显示不支持的软件包:

$ubuntu-support-status --show-unsupported

输出示例:

Support status summary of 'ubuntuserver':
You have 514 packages (100.0%) supported until April 2023 (Canonical - 5y)
You have 0 packages (0.0%) that can not/no-longer be downloaded
You have 0 packages (0.0%) that are unsupported
No longer downloadable:
Unsupported:

如我们所见,我有0个不受支持的软件包。

同样,我们可以使用以下命令显示仅显示受支持的软件包:

$ubuntu-support-status --show-supported

该命令将列出Ubuntu系统支持的所有软件包。

例如,要查看更多详细信息:显示所有软件包及其状态,请运行:

$ubuntu-support-status --show-all

要显示帮助部分,请运行:

$ubuntu-support-status --help
Usage: ubuntu-support-status [options]
Options:
  -h, --help          show this help message and exit
  --show-unsupported  Show unsupported packages on this machine
  --show-supported    Show supported packages on this machine
  --show-all          Show all packages with their status
  --list              Show all packages in a list

我们还可以使用另一个命令“ hwe-support-status”来查找Ubuntu系统的支持期。

$hwe-support-status --verbose
You are not running a system with a Hardware Enablement Stack. Your system is supported until April 2023.