Ubuntu16.04 替換阿裏雲軟件源
阿新 • • 發佈:2018-04-30
extras 文件的 修改 rop ive 文件內容 RoCE pan ror
一,備份原來的源文件
1,首先,進入源文件 sources.list 所在的目錄:
cd /etc/apt/
2,執行sudo cp sources.list sources.list.bak
對源文件進行備份,以防萬一;
二,修改源文件內容
1,阿裏雲軟件源的文件的內容如下:
#deb包
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##測試版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源碼
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##測試版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作夥伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
2,將上述的阿裏雲的源文件內容全部復制先
使用sudo vim sources.list
打開文件,輸入ggdG
刪除所有內容(這句指令可以理解為從第1行到最後1行之間的內容都刪了)
將復制的內容粘貼到本文件中;輸入:wq
保存退出;
三,更新源和軟件
1,使用sudo apt-get update
即可更新獲取 阿裏雲軟件源 提供的軟件列表;
2,使用sudo apt-get upgrade
即可更新軟件;
Ubuntu16.04 替換阿裏雲軟件源