Ubuntu各個版本更換映象源

2022-06-28 17:12:10 字數 3294 閱讀 5147

先備份,再編輯,養成好習慣。

以下指令碼可直接執行

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak:

sudo sh -c 'echo "#阿里雲的源速度最快

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

" > /etc/apt/sources.list'

sudo apt update

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak:

sudo sh -c 'echo "#阿里雲的源速度最快

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

" > /etc/apt/sources.list'

sudo apt update

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

sudo sh -c 'echo "#阿里雲的源速度最快

deb bionic main restricted universe multiverse

deb bionic-security main restricted universe multiverse

deb bionic-updates main restricted universe multiverse

deb bionic-proposed main restricted universe multiverse

deb bionic-backports main restricted universe multiverse

deb-src bionic main restricted universe multiverse

deb-src bionic-security main restricted universe multiverse

deb-src bionic-updates main restricted universe multiverse

deb-src bionic-proposed main restricted universe multiverse

deb-src bionic-backports main restricted universe multiverse

" > /etc/apt/sources.list'

sudo apt update

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

sudo sh -c 'echo "#阿里雲的源速度最快

deb focal main restricted universe multiverse

deb-src focal main restricted universe multiverse

deb focal-security main restricted universe multiverse

deb-src focal-security main restricted universe multiverse

deb focal-updates main restricted universe multiverse

deb-src focal-updates main restricted universe multiverse

deb focal-proposed main restricted universe multiverse

deb-src focal-proposed main restricted universe multiverse

deb focal-backports main restricted universe multiverse

deb-src focal-backports main restricted universe multiverse

" > /etc/apt/sources.list'

sudo apt update

Ubuntu 16 04 更換源 映象

ubuntu 16.04 更換源 映象 具體步驟如下 cd mkdir pip sudo vim pip pip.conf然後儲存以下資訊 這裡主要使用的是阿里的雲 global index url install trusted host mirrors.aliyun.com你也可以使用其他的雲 ...

更換centos映象源

國內主要開源的開源映象站點網易和阿里雲,可以更改為這兩個之一,在此使用網易的映象演示 1.首先備份系統自帶yum源配置檔案 我的源hanwate cdrom.repo.backup 根據實際情況修改 mv etc yum.repos.d hanwate cdrom.repo etc yum.repo...

conda更換映象源

新增國內源 conda config add channels conda config add channels conda config set show channel urls yes 換回預設源 conda config remove key channels 在執行conda confi...