Ubuntu 发行版升级

该文提供了从Ubuntu18.04到20.04的升级过程,包括更新所有软件包、安装update-manager-core、执行do-release-upgrade命令。在升级过程中,需要注意SSH连接可能中断,系统会启动一个额外的SSH服务在端口1022。升级后,部分第三方源会被禁用,需手动重新启用。
摘要由CSDN通过智能技术生成

方法适用于 Ubuntu 发行版的更新/升级,例如 Ubuntu 18.04 升级到 20.04。

步骤

  1. 升级前需要先更新所有软件包
sudo apt update && sudo apt dist-upgrade
  1. 确保系统中安装了 update-manager-core 软件包
sudo apt install update-manager-core
  1. 开始升级,根据提示一路 y 或者回车就可以了
sudo do-release-upgrade

常见问题

  1. 升级 ssh 连接的服务器时会出现以下提示,建议记录一下启动的额外的 ssh 端口以防当前 ssh 连接中断。
Continue running under SSH? 

This session appears to be running under ssh. It is not recommended 
to perform a upgrade over ssh currently because in case of failure it 
is harder to recover. 

If you continue, an additional ssh daemon will be started at port 
'1022'. 
Do you want to continue? 

Continue [yN]y

Starting additional sshd 

To make recovery in case of failure easier, an additional sshd will 
be started on port '1022'. If anything goes wrong with the running 
ssh you can still connect to the additional one. 


To continue please press [ENTER]
  1. 部分需要输入的地方可能出现 Backspace 无法删除的字符,例如 ^[[D^[[C^[[A^[[C^H 等,可以通过 Ctrl+Backspace 删掉。
  2. 升级会干掉一些 sources.list 中的第三方源,升级之后不要忘记修改一下,原文如下:
Third party sources disabled 

Some third party entries in your sources.list were disabled. You can 
re-enable them after the upgrade with the 'software-properties' tool 
or your package manager. 

To continue please press [ENTER]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值