ubuntu18.04 升级到 20.4

2020-05-18  本文已影响0人  流浪的企鹅

1. 首先更新系统到最新的18.04版本。

sudo apt update 
sudo apt full-upgrade
sudo apt autoremove
sudo apt install update-manager-core
sudo reboot

2.重启后,执行升级。

sudo do-release-upgrade -m desktop

3.设置阿里的ubuntu更新源

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
sudo cat >/etc/apt/sources.list <<EOF
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
EOF
sudo apt update
sudo apt upgrade
上一篇下一篇

猜你喜欢

热点阅读