更換Ubuntu的更新源方式

2021-08-13 08:55:31 字數 1693 閱讀 4444

step 1.進入到root許可權

$ sudo su

step 2. 備份原來的更新源

$cp /etc/apt/sources.list /etc/apt/sources.list.backup

step 3.修改更新源(sources.list存放更新源的檔案)

$nano /etc/apt/sources.list

刪除sources.list裡面原有的所有內容,並將下面所有內容複製到sources.list裡面進行替換

(用163的源替換原有的源)

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

step 4.讓更新的源生效

$sudo apt-get update

author: wsh

email: [email protected]

ubuntu 更換更新源

貼上內容 1 備份原來的更新源 cp etc apt sources.list etc apt sources.list.backup 如果提示許可權不夠就輸入下面兩行,先進入到超級使用者,再備份 sudo s cp etc apt sources.list etc apt sources.list...

給Ubuntu 16 04更換更新源

下面是更換步驟 1 備份原來的更新源 cp etc apt sources.list etc apt sources.list.backup 如果提示許可權不夠就輸入下面兩行,先進入到超級使用者,再備份 sudo s cp etc apt sources.list etc apt sources.l...

給Ubuntu 16 04更換更新源

下面是更換步驟 1 備份原來的更新源 cp etc apt sources.list etc apt sources.list.backup 如果提示許可權不夠就輸入下面兩行,先進入到超級使用者,再備份 sudo s cp etc apt sources.list etc apt sources.l...