貼上內容來源https://www.cnblogs.com/Alier/p/6358447.html 1 備份原來的更新源 2 修改更新源 打開sources.list (這就是存放更新源的文件) 1.阿裡源 將下麵所有內容複製,粘貼並覆蓋sources.list文件中的所有內容 2.清華源 進入網 ...
貼上內容來源https://www.cnblogs.com/Alier/p/6358447.html
1 備份原來的更新源
cp /etc/apt/sources.list /etc/apt/sources.list.backup 如果提示許可權不夠就輸入下麵兩行,先進入到超級用戶,再備份 sudo -s cp /etc/apt/sources.list /etc/apt/sources.list.backup
2 修改更新源
打開sources.list (這就是存放更新源的文件)
sudo vim /etc/apt/sources.list
1.阿裡源 將下麵所有內容複製,粘貼並覆蓋sources.list文件中的所有內容
#deb包 deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##測試版源 deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源碼 deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##測試版源 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # Canonical 合作伙伴和附加 deb http://archive.canonical.com/ubuntu/ xenial partner deb http://extras.ubuntu.com/ubuntu/ xenial main
2.清華源
進入網址複製可更改系統版本:https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
3 讓更新源生效
sudo apt-get update