修改Ubuntu映象源
阿新 • • 發佈:2018-12-26
安裝好Ubuntu16.04之後發現,系統預設的軟體源不能用,需要更改為國內的映象源。
1、備份系統預設源
1 |
sudo cp /etc/apt/sources .list /etc/apt/sources .list.bak
|
2、開啟軟體原始檔
1 |
sudo vim /etc/apt/sources .list
|
3、將以下內容替換到原始檔(注意在清華大學網站上選擇合適自己系統的版本)
# 預設註釋了原始碼映象以提高 apt update 速度,如有需要可自行取消註釋 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # 預釋出軟體源,不建議啟用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
4、更新軟體源
1 |
sudo apt-get update
|
5、更新系統所有軟體
1 |
sudo apt-get dist-upgrade
|
選擇是,系統就會自動更新所有已安裝的軟體到最新版。