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

1.備份ubuntu

備份/etc/apt/sources.list文件bash

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

2.新建ionic

新建/etc/apt/sources.list文件並添加如下內容阿里雲

在root管理員下spa

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

2.1 阿里源:.net

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 其它源rest

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 擴展code

Ubuntu 官方(歐洲,國內較慢,無同步延遲)http://archive.ubuntu.com/ubuntu/blog

Ubuntu 官方中國(目前是阿里雲)http://cn.archive.ubuntu.com/ubuntu/ci

網易(廣東廣州電信/聯通千兆雙線接入)http://mirrors.163.com/ubuntu/

搜狐(山東聯通千兆接入)http://mirrors.sohu.com/ubuntu/

阿里雲(北京萬網/浙江杭州阿里雲服務器雙線接入)http://mirrors.aliyun.com/ubuntu/

詳情見:http://wiki.ubuntu.org.cn/模板:18.04source

3 更新

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

1
2
apt update
apt upgrade

4 參考

4.1 Ubuntu18.04更換國內源

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

4.3 ubuntu中文模板源

相關文章
相關標籤/搜索