如何从命令行查找 Ubuntu 支持持续时间

你可能已经知道, 典范Ubuntu 的母公司,发布新版本的 Ubuntu 桌面版和服务器版 每六个月 (四月和十月)。 并且每两年,四月发布的 Ubuntu 版本是一个 大号小号支持(LTS 简而言之)版本。 LTS 版本将获得五年支持,而非 LTS 版本将仅支持 9 个月。 最新可用的非 LTS 版本是 Ubuntu 19.10(2019 年 10 月发布),LTS 版本是 2018 年 4 月发布的 Ubuntu 18.04。您可以从 Ubuntu 官方版本中找到所有 Ubuntu 版本的列表及其支持期限页。 但是,您是否知道我们可以在不参考官方网站的情况下找到 Ubuntu 支持期限? 如果您还不知道,这里有一个快速提示。

有一个命令叫 “ubuntu 支持状态” 它告诉我们 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 于 2018 年 4 月发布,它将在未来五年即 2023 年 4 月得到支持。

Ubuntu 18.04 桌面版的示例输出:

Support status summary of 'ostechnix':  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