Ubuntu 18.04.4 LTS 更換國內系統源


Ubuntu 18.04.4 LTS 更換國內系統源

  1.1) 好習慣先做備份在干活: 
      mv /etc/apt/sources.list /etc/apt/sources.list.bak
      
  1.2) 查看ubuntu版本:
      lsb_release -c | grep -o "\s.*"
	      bionic
	      
  1.3) 阿里雲的源(將下列內容復制/etc/apt/sources.list)
      vim /etc/apt/sources.list
      
      *** 注意將$SYS_VERSION替換為上一步中獲取的版本信息。***這點非常重要,否則會失敗。(我這里的版本是:bionic) ***
      
## 阿里雲的源(將下列內容復制/etc/apt/sources.list):
deb http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ $SYS_VERSION-proposed main restricted universe multiverse

   1.4) 執行更新命令:
        apt-get update

image


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM