ubuntu修改镜像源

版权声明:内容版权为CSDN用户:kayseen 所有,若您需要引用、转载,需要注明来源及原文链接 https://blog.csdn.net/m0_43394876/article/details/88751825

1.找一个国内的镜像源

比如清华大学的ubuntu1604镜像源:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

2.备份系统的现有镜像源

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

3. 更新源服务器列表

就是修改镜像源文件里面的内容:
vim /etc/apt/sources.list
然后删除之前的,把清华大学的粘贴上去

4.Ubuntu软件操作的相关命令

sudo apt-get update 更新源

sudo apt-get install package 安装包

sudo apt-get remove package 删除包

猜你喜欢

转载自blog.csdn.net/m0_43394876/article/details/88751825