Ubuntu18升级到20

1、升级准备
做好资料备份

2、开始升级

# 更新Ubuntu18
sudo apt get update
sudo apt get upgrade
sudo apt autoremove

# 查看有哪些版本可以升级
sudo do-release-upgrade -c
sudo do-release-upgrade -d -c

# 升级到Ubuntu20
sudo do-release-upgrade -d

# 系统会自动升级,升级后,桌面操作快乐很多
# 现阶段有个问题,就是升级后,桌面快捷方式都不能使用了,不知道怎么回事

3、替换国内源

sudo vi /etc/apt/sources.list
deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse

4、禁用自动更新

# 1都改为0
sudo vi /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";

Leave a Reply

Your email address will not be published. Required fields are marked *

*