久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

Ubuntu如何更換國內源

166次閱讀
沒有評論

共計 4684 個字符,預計需要花費 12 分鐘才能閱讀完成。

這篇文章主要介紹“Ubuntu 如何更換國內源”的相關知識,丸趣 TV 小編通過實際案例向大家展示操作過程,操作方法簡單快捷,實用性強,希望這篇“Ubuntu 如何更換國內源”文章能幫助大家解決問題。

ubuntu 本身的源使用的是國內的源,下載速度比較慢,不像 centos 一樣 yum 安裝的時候對鏡像站點進項選擇,所以選擇了更換成國內的源。

備份 /etc/apt/sources.list 文件
mv /etc/apt/sources.list /etc/apt/sourses.list.backup

新建 /etc/apt/sources.list 文件并添加以下內容

#163 源
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

更改完成之后執行以下命令

# apt update
# apt upgrade

其他的一些 apt 命令

sudo apt-get update  更新源
sudo apt-get install package  安裝包
sudo apt-get remove package  刪除包
sudo apt-cache search package  搜索軟件包
sudo apt-cache show package  獲取包的相關信息,如說明、大小、版本等
sudo apt-get install package --reinstall  重新安裝包
sudo apt-get -f install  修復安裝
sudo apt-get remove package --purge  刪除包,包括配置文件等
sudo apt-get build-dep package  安裝相關的編譯環境
sudo apt-get upgrade  更新已安裝的包
sudo apt-get dist-upgrade  升級系統
sudo apt-cache depends package  了解使用該包依賴那些包
sudo apt-cache rdepends package  查看該包被哪些包依賴
sudo apt-get source package  下載該包的源代碼
sudo apt-get clean   sudo apt-get autoclean  清理無用的包
sudo apt-get check  檢查是否有損壞的依賴 

其他幾個國內的源:

# 中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#阿里云源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

關于“Ubuntu 如何更換國內源”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識,可以關注丸趣 TV 行業資訊頻道,丸趣 TV 小編每天都會為大家更新不同的知識點。

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-14發表,共計4684字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 安陆市| 探索| 云阳县| 磐安县| 楚雄市| 德令哈市| 武冈市| 福州市| 微山县| 南和县| 松江区| 布尔津县| 扶绥县| 婺源县| 中卫市| 翼城县| 河东区| 鹿泉市| 虹口区| 临湘市| 寻甸| 朔州市| 娱乐| 鹤壁市| 大厂| 水富县| 桦南县| 黑龙江省| 安塞县| 苏尼特左旗| 广宗县| 孟连| 白玉县| 临澧县| 林西县| 炉霍县| 武冈市| 峨山| 象山县| 合作市| 青州市|