Ubuntu18.04更換國內源(阿里,網易,中科大,清華等源)

lhrbest發表於2020-05-22


Ubuntu18.04更換國內源(阿里,網易,中科大,清華等源)


1.備份

備份/etc/apt/sources.list檔案

1
mv  /etc/apt/sources .list  /etc/apt/sourses .list.backup

2.新建

新建/etc/apt/sources.list檔案並新增以下內容

在root管理員下

1
2
3
4
// 切換到管理員
sudo  su
// 新建檔案並寫入
vi  /etc/apt/sources .list

2.1 阿里源:

1
2
3
4
5
6
7
8
9
10
deb http: //mirrors .aliyun.com /ubuntu/  bionic main restricted universe multiverse
deb http: //mirrors .aliyun.com /ubuntu/  bionic-security main restricted universe multiverse
deb http: //mirrors .aliyun.com /ubuntu/  bionic-updates main restricted universe multiverse
deb http: //mirrors .aliyun.com /ubuntu/  bionic-proposed main restricted universe multiverse
deb http: //mirrors .aliyun.com /ubuntu/  bionic-backports main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic-security main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic-updates main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic-proposed main restricted universe multiverse
deb-src http: //mirrors .aliyun.com /ubuntu/  bionic-backports main restricted universe multiverse

2.2 其它源

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#清華源
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic main restricted universe multiverse
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-updates main restricted universe multiverse
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-backports main restricted universe multiverse
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-security main restricted universe multiverse
deb https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-proposed main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-updates main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-backports main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-security main restricted universe multiverse
deb-src https: //mirrors .tuna.tsinghua.edu.cn /ubuntu/  bionic-proposed main restricted universe multiverse
 
#中科大源
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic main restricted universe multiverse
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic-updates main restricted universe multiverse
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic-backports main restricted universe multiverse
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic-security main restricted universe multiverse
deb https: //mirrors .ustc.edu.cn /ubuntu/  bionic-proposed main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic-updates main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic-backports main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic-security main restricted universe multiverse
deb-src https: //mirrors .ustc.edu.cn /ubuntu/  bionic-proposed main restricted universe multiverse

 

2.3 擴充套件

Ubuntu 官方 (歐洲,國內較慢,無同步延遲)

Ubuntu 官方中國 (目前是阿里雲)

網易 (廣東廣州電信/聯通千兆雙線接入)

搜狐 (山東聯通千兆接入)

阿里雲 (北京萬網/浙江杭州阿里雲伺服器雙線接入)

詳情見:模板:18.04source

3 更新

更改完成之後執行以下命令 

1
2
apt update
apt upgrade

4 參考

4.1  Ubuntu18.04更換國內源

4.2   apt-get 軟體原始檔格式以及ubuntu 18.04更換阿里源 (源內容格式的原理) 

4.3 




About Me

........................................................................................................................

● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除

● 本文在itpub、部落格園、CSDN和個人微 信公眾號( DB寶)上有同步更新

● 本文itpub地址: http://blog.itpub.net/26736162

● 本文部落格園地址: http://www.cnblogs.com/lhrbest

● 本文CSDN地址: https://blog.csdn.net/lihuarongaini

● 本文pdf版、個人簡介及小麥苗雲盤地址: http://blog.itpub.net/26736162/viewspace-1624453/

● 資料庫筆試面試題庫及解答: http://blog.itpub.net/26736162/viewspace-2134706/

● DBA寶典今日頭條號地址:

........................................................................................................................

● QQ群號: 230161599 、618766405

● 微 信群:可加我微 信,我拉大家進群,非誠勿擾

● 聯絡我請加QQ好友 646634621 ,註明新增緣由

● 於 2020-05-01 06:00 ~ 2020-05-30 24:00 在西安完成

● 最新修改時間:2020-05-01 06:00 ~ 2020-05-30 24:00

● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解

● 版權所有,歡迎分享本文,轉載請保留出處

........................................................................................................................

小麥苗的微店

小麥苗出版的資料庫類叢書http://blog.itpub.net/26736162/viewspace-2142121/

小麥苗OCP、OCM、高可用網路班http://blog.itpub.net/26736162/viewspace-2148098/

小麥苗騰訊課堂主頁https://lhr.ke.qq.com/

........................................................................................................................

使用 微 信客戶端掃描下面的二維碼來關注小麥苗的微 信公眾號( DB寶)及QQ群(DBA寶典)、新增小麥苗微 信, 學習最實用的資料庫技術。

........................................................................................................................

歡迎與我聯絡

 

 



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

相關文章