安裝好ubuntu雙系統(tǒng)后,默認(rèn)的軟件更新源是國外的,在國內(nèi)使用速度很慢淹仑,需要更換成國內(nèi)的源,這樣才能正常安裝和更新軟件肺孵。
一匀借、ubuntu16.04更換國內(nèi)源
1.備份原始源文件sources.list
桌面打開終端,執(zhí)行命令:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.修改源文件sources.list
(1)終端執(zhí)行命令:
sudo chmod 777 /etc/apt/sources.list 更改文件權(quán)限使其可編輯平窘;
(2)執(zhí)行命令:
sudo gedit /etc/apt/sources.list 打開文件進(jìn)行編輯吓肋;
(3)刪除原來的文件內(nèi)容,復(fù)制下面的任意一個(gè)到其中并保存(常用的是阿里源和清華源瑰艘,推薦阿里源)是鬼;
阿里源:
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-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/?xenial-backports 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-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/?xenial-backports main restricted universe multiverse
清華源:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic main restricted universe multiverse
deb-src 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-src 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-src 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-src 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-proposed main restricted universe multiverse
3.更新源
桌面終端執(zhí)行命令:
sudo apt update更新軟件列表,換源完成紫新。
二均蜜、ubuntu18.04更換國內(nèi)源
1.備份原始源文件sources.list
桌面打開終端,執(zhí)行命令:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.修改源文件sources.list
(1)終端執(zhí)行命令:
sudo chmod 777 /etc/apt/source.list 更改文件權(quán)限使其可編輯芒率;
(2)執(zhí)行命令:
sudo gedit /etc/apt/sources.list打開文件進(jìn)行編輯囤耳;
(3)刪除原來的文件內(nèi)容,復(fù)制下面的任意一個(gè)到其中并保存(常用的是阿里源和清華源偶芍,推薦阿里源充择,內(nèi)容可以去博客復(fù)制);
阿里源:
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
清華源:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/?bionic main restricted universe multiverse
deb-src 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-src 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-src 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-src 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-proposed main restricted universe multiverse
163源:
deb http://mirrors.163.com/ubuntu/?bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/?bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/?bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/?bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/?bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/?bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/?bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/?bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/?bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/?bionic-backports main restricted universe multiverse
3.更新源
桌面終端執(zhí)行命令:
sudo apt update更新軟件列表匪蟀,換源完成椎麦。
參考: