0
点赞
收藏
分享

微信扫一扫

Ubuntu20.04换为清华的镜像源

全栈学习笔记 2022-04-30 阅读 169

安装过程:

Ubuntu 的软件源配置文件是 /etc/apt/sources.list。

在修改之前,先将系统自带的该文件做个备份,将该文件替换为清华源官网提供的内容,即可使用 TUNA 的软件源镜像。

第一步:

切换到root账户:

sudo -s

第二步:

进行源备份

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

第三步:

进行源列表的修改,将sources.list中的内容提换如下:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse

# deb-src 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-src 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-src 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-src 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-proposed main restricted universe multiverse

第四步:

执行更新列表

sudo apt-get update

举报

相关推荐

0 条评论