有没有办法从命令行得知 Ubuntu 某个版本不再受支持?我正在寻找类似的东西(不使用 Google 或维基百科),
apt-release-support xenial
或者,即使它只是告诉我我的发行版受支持。
答案1
运行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'.
答案2
运行hwe-support-status
以获得简单的结果。使用--verbose
选项,否则如果系统未使用,用户将看不到任何内容LTS 支持堆栈。
使用现有内核的 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 上的包,它与提供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