Ubuntu更新軟體源

mug發表於2021-09-09

預設情況下,Ubuntu的軟體源在國內使用不是很理想,網速限制太大,造成一些較大的軟體下載安裝一直超時的情況出現。

針對這樣的情況,只需要對Ubuntu的軟體源(自動搜尋安裝軟體的遠端倉庫)新增更新國內各位大佬或者組織維護的軟體源即可。

以Ubuntu18.04為例:

1. 備份原有軟體原始檔

cp /etc/apt/sources.list /etc/apt/sources.list.bak_yyyymmdd

2. 開啟sources.list檔案,在檔案末尾增加如下軟體源地址

vi /etc/apt/sources.list

追加如下地址:

#新增阿里源
deb  bionic main restricted universe multiverse
deb  bionic-security main restricted universe multiverse
deb  bionic-updates main restricted universe multiverse
deb  bionic-proposed main restricted universe multiverse
deb  bionic-backports main restricted universe multiverse
deb-src  bionic main restricted universe multiverse
deb-src  bionic-security main restricted universe multiverse
deb-src  bionic-updates main restricted universe multiverse
deb-src  bionic-proposed main restricted universe multiverse
deb-src  bionic-backports main restricted universe multiverse

3. 更新系統軟體源

執行命令,更新系統軟體源地址

apt-get update
apt-get upgrade

4. 其他軟體源

中科大源
##中科大源
deb  bionic main restricted universe multiverse
deb-src  bionic main restricted universe multiverse
deb  bionic-updates main restricted universe multiverse
deb-src  bionic-updates main restricted universe multiverse
deb  bionic-backports main restricted universe multiverse
deb-src  bionic-backports main restricted universe multiverse
deb  bionic-security main restricted universe multiverse
deb-src  bionic-security main restricted universe multiverse
deb  bionic-proposed main restricted universe multiverse
deb-src  bionic-proposed main restricted universe multiverse

163源
##163源
deb  bionic main restricted universe multiverse
deb  bionic-security main restricted universe multiverse
deb  bionic-updates main restricted universe multiverse
deb  bionic-proposed main restricted universe multiverse
deb  bionic-backports main restricted universe multiverse
deb-src  bionic main restricted universe multiverse
deb-src  bionic-security main restricted universe multiverse
deb-src  bionic-updates main restricted universe multiverse
deb-src  bionic-proposed main restricted universe multiverse
deb-src  bionic-backports main restricted universe multiverse

清華源
##清華源
deb  bionic main restricted universe multiverse
deb-src  bionic main restricted universe multiverse
deb  bionic-updates main restricted universe multiverse
deb-src  bionic-updates main restricted universe multiverse
deb  bionic-backports main restricted universe multiverse
deb-src  bionic-backports main restricted universe multiverse
deb  bionic-security main restricted universe multiverse
deb-src  bionic-security main restricted universe multiverse
deb  bionic-proposed main restricted universe multiverse
deb-src  bionic-proposed main restricted universe multiverse

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/506/viewspace-2819455/,如需轉載,請註明出處,否則將追究法律責任。

相關文章