Ubuntu 20.04 LTS 升级 20.10

更新当前系统

1
2
3
sudo apt update
sudo apt -y dist-upgrade
sudo apt -y autoremove

注意:上面三个命令的含义依次为检查系统更新、更新软件程序、删除无用软件。

配置升级程序

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Default behavior for the release upgrader.

[DEFAULT]
# Default prompting and upgrade behavior, valid options:
#
# never - Never check for, or allow upgrading to, a new release.
# normal - Check to see if a new release is available. If more than one new
# release is found, the release upgrader will attempt to upgrade to
# the supported release that immediately succeeds the
# currently-running release.
# lts - Check to see if a new LTS release is available. The upgrader
# will attempt to upgrade to the first LTS release available after
# the currently-running one. Note that if this option is used and
# the currently-running release is not itself an LTS release the
# upgrader will assume prompt was meant to be normal.
Prompt=normal

注意:用命令 vim /etc/update-manager/release-upgrades 编辑文件,将 lts 设置为 normal

执行升级命令

1
$ sudo do-release-upgrade

注意:使用上述命令开始升级系统,升级时需下载大量文件,所以用时较久。

升级注意事项

升级过程会有操作提示,请根据需要输入 y 或 N。如果在生产环境中操作,有可能需对正在运行的服务进行升级,会有配置文件更新提示,根据提示操作即可,如遇问题,欢迎在评论区与懒猪交流。

升级结束后会提示是否重启系统,输入 y 并回车重启即可。Ubuntu 的升级与 Windows 不同,不需要在开机阶段等待很长时间。

本文链接:https://my.lmcjl.com/post/18712.html

展开阅读全文

4 评论

留下您的评论.