國內(nèi)有很多Ubuntu的鏡像源,,包括阿里的、網(wǎng)易的,,還有很多教育網(wǎng)的源,,比如:清華源、中科大源,。 我們這里以清華源為例講解如何修改Ubuntu 18.04里面默認的源,。
1、輸入命令修改sources.list文件,當(dāng)然需要超級權(quán)限,,所以要加sudo,;
sudo gedit /etc/apt/sources.list
編輯/etc/apt/sources.list文件
2、在文件最前面添加以下條目(操作前請做好相應(yīng)備份):
deb https://mirrors.tuna./ubuntu/ bionic main restricted universe multiverse deb-src https://mirrors.tuna./ubuntu/ bionic main restricted universe multiverse deb https://mirrors.tuna./ubuntu/ bionic-updates main restricted universe multiverse deb-src https://mirrors.tuna./ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.tuna./ubuntu/ bionic-backports main restricted universe multiverse deb-src https://mirrors.tuna./ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.tuna./ubuntu/ bionic-security main restricted universe multiverse deb-src https://mirrors.tuna./ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.tuna./ubuntu/ bionic-proposed main restricted universe multiverse deb-src https://mirrors.tuna./ubuntu/ bionic-proposed main restricted universe multiverse
3,、修改完成后,,保存文件,警告什么的都不理,,然后運行下面的命令,。
sudo apt-get update sudo apt-get upgrade
4、到此完成國內(nèi)源更新,。
附加其他源內(nèi)容,,需要的自己添加進sources.list文件里面就ok了。
阿里源:
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.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb-src 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-src 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-src 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-src 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-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
Ubuntu 18.04 在系統(tǒng)設(shè)置里面是找不到軟件源設(shè)置界面按鈕的(找了好久都沒找到T-T),,所以需要一些指令幫助啟動圖形界面以便設(shè)置軟件源,。 1、輸入命令
sudo update-manager -c -d
2,、會彈出Software Updater提示框,,這就好辦了,點擊左下角Settings…按鈕,,久違的軟件源設(shè)置就會出來啦,。
|