由于Ubuntu官方软件源太慢了,换回国内的软件源这样快很多。
1. 备份源配置文件
代码语言:javascript复制sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2. 修改配置文件
代码语言:javascript复制sudo gedit /etc/apt/sources.list
覆盖sources.list
配置文件的内容:
# 清华大学软件源
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
3. 更新软件源
代码语言:javascript复制sudo apt-get update