Ubuntu 更改 apt 源为 清华大学 作者: Chuwen 时间: 2019-08-01 分类: Linux # 备份原有 软件源配置文件 ``` sudo cp /etc/apt/sources.list /etc/apt/sources.list.back ``` # 删除原有软件配置文件并新建 `sources.list` ``` sudo rm -rf /etc/apt/sources.list && sudo touch /etc/apt/sources.list ``` # 编辑 `/etc/apt/sources.list` 文件 ``` sudo vi /etc/apt/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 ``` - ## 按 `i` 键启用**插入模式** - ## Shift + Insert 粘贴文本或者右键粘贴??? - ## 按 `esc` 键,然后输入 `:wq` 按回车 *保存并退出* # 完成,更新下 ``` sudo apt update ``` 标签: Linux, Ubuntu