ubuntu 更換apt國內源 (阿里雲映象)

2021-09-25 15:29:44 字數 2259 閱讀 5502

ubuntu 的軟體源配置檔案是 /etc/apt/sources.list。將系統自帶的該檔案做個備份

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bakcup
編輯原來的檔案

sudo nano /etc/apt/sources.list      # 個人比較喜歡用nano 不習慣可把nano更換為vim
把sources.list 的所有內容注釋掉 然後貼上如下內容
deb  trusty main restricted universe multiverse

deb trusty-security main restricted universe multiverse

deb trusty-updates main restricted universe multiverse

deb trusty-proposed main restricted universe multiverse

deb trusty-backports main restricted universe multiverse

deb-src trusty main restricted universe multiverse

deb-src trusty-security main restricted universe multiverse

deb-src trusty-updates main restricted universe multiverse

deb-src trusty-proposed main restricted universe multiverse

deb-src trusty-backports main restricted universe multiverse

deb  xenial main restricted universe multiverse

deb xenial-security main restricted universe multiverse

deb xenial-updates main restricted universe multiverse

deb xenial-proposed main restricted universe multiverse

deb xenial-backports main restricted universe multiverse

deb-src xenial main restricted universe multiverse

deb-src xenial-security main restricted universe multiverse

deb-src xenial-updates main restricted universe multiverse

deb-src xenial-proposed main restricted universe multiverse

deb-src xenial-backports main restricted universe multiverse

deb  bionic main restricted universe multiverse

deb-src bionic main restricted universe multiverse

deb bionic-security main restricted universe multiverse

deb-src bionic-security main restricted universe multiverse

deb bionic-updates main restricted universe multiverse

deb-src bionic-updates main restricted universe multiverse

deb bionic-proposed main restricted universe multiverse

deb-src bionic-proposed main restricted universe multiverse

deb bionic-backports main restricted universe multiverse

deb-src bionic-backports main restricted universe multiverse

Ubuntu 更換國內源

sudo cp etc apt sources.list etc apt sources.list.bak 備份 sudo vim etc apt sources.list 修改 sudo apt get update 更新列表 阿里雲源 deb trusty main restricted uni...

ubuntu 更換國內源

安裝好ubuntu系統後,預設的軟體更新源是國外的,在國內使用速度很慢,用 apt install 安裝軟體時可能出現 網路不可達 你的網路需要認證嗎 無法定位軟體包 等錯誤,所以我們需要更換成國內的源,這樣才能正常安裝和更新軟體。桌面開啟終端,執行命令 sudo cp etc apt source...

Ubuntu18 04更換國內源和apt常用的命令

mv etc apt sources.list etc apt sourses.list.backup 163源 deb bionic main restricted universe multiverse deb bionic security main restricted universe m...