1. 程式人生 > 其它 >ubuntu 20.0.4 LTS 配置國內apt-get源

ubuntu 20.0.4 LTS 配置國內apt-get源

https://blog.csdn.net/weixin_39394526/article/details/87935449

Ubuntu 的軟體源配置檔案是 /etc/apt/sources.list
1\為避免出現問題,先備份

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

2\編輯sources.list檔案替換內容

sudo vi /etc/apt/sources.list

選擇你的ubuntu版本:20.0.4 LTS

# 預設註釋了原始碼映象以提高 apt update 速度,如有需要可自行取消註釋
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse deb https://
mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse # deb-src https://
mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse # 預釋出軟體源,不建議啟用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

3\更新源

sudo apt-get update

完成