Ubuntu 更换源 - 百年刘傲天

in Ubuntu with 0 comment

Ubuntu更换源

cd /etc/apt/

先把原有的源copy一份,方便以后换回来

cp source.list source.list.bak
sudo rm source.list
sudo vim source.list 或 sudo gedit source.list

deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
复制过去即可

sudo apt update
sudo apt upgrade

END

Responses