如何在命令行中查看Ubuntu版本是否仍然得到支持?

有没有办法通过命令行判断Ubuntu的一个版本是否已经不再受支持?我想要类似这样的东西,(不使用Google或维基百科)。
apt-release-support xenial

或者,即使它只是告诉我是否支持我的发行版。
2个回答

运行ubuntu-support-status命令可以告诉你安装的所有内容的支持期限有多长,以下是我的输出示例:
Support status summary of 'ivory':

You have 1904 packages (75.7%) supported until April 2021 (5y)
You have 14 packages (0.6%) supported until January 2022 (5y)
You have 83 packages (3.3%) supported until April 2019 (3y)
You have 237 packages (9.4%) supported until January 2017 (9m)

You have 80 packages (3.2%) that can not/no-longer be downloaded
You have 197 packages (7.8%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details

编辑于2021年7月11日:

在较新的Ubuntu版本(已验证为20.04),ubuntu-support-status已被ubuntu-security-status取代。

$ ubuntu-security-status
2553 packages installed, of which:
2073 receive package updates with LTS until 4/2025
 467 are receiving security updates with ESM Apps until 4/2030
  10 packages are from third parties
   3 packages are no longer available for download

Packages from third parties are not provided by the official Ubuntu
archive, for example packages from Personal Package Archives in
Launchpad.
For more information on the packages, run 'ubuntu-security-status
--thirdparty'.

Packages that are not available for download may be left over from a
previous release of Ubuntu, may have been installed directly from a
.deb file, or are from a source which has been disabled.
For more information on the packages, run 'ubuntu-security-status
--unavailable'.

1不错!ubuntu-support-status --show-all 真是太酷了,可以看到所有应用程序的支持时间,以及是否不再受支持。点赞! - Terrance
2从那个软件包列表中,有什么简单的方法可以得出Ubuntu发行版的支持状态呢? - Byte Commander
啊,看起来这个已经被替换成了 ubuntu-security-status - Terrance
1@Terrance 随意进行编辑! - Jorge Castro

运行 hwe-support-status 命令以获取简单结果。使用 --verbose 选项,否则如果系统未使用 LTS Enablement Stack,用户将看不到任何内容。
在 14.04 版本中的示例结果:
$ hwe-support-status
$ hwe-support-status --verbose
You are not running a system with a Hardware Enablement Stack. \
Your system is supported until April 2019.

上述命令是在Ubuntu上由update-manager-core软件包提供的,该软件包还提供了ubuntu-support-status命令。
$ dpkg --search support-status
update-manager-core: /usr/bin/hwe-support-status
update-manager-core: /usr/bin/ubuntu-support-status

终端用户只需要运行以下命令:hwe-support-status --verbose