ubuntu16.4 更换更新源
Posted The_small_white
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu16.4 更换更新源相关的知识,希望对你有一定的参考价值。
贴上内容来源https://www.cnblogs.com/Alier/p/6358447.html
1 备份原来的更新源
cp /etc/apt/sources.list /etc/apt/sources.list.backup 如果提示权限不够就输入下面两行,先进入到超级用户,再备份 sudo -s cp /etc/apt/sources.list /etc/apt/sources.list.backup
2 修改更新源
打开sources.list (这就是存放更新源的文件)
sudo vim /etc/apt/sources.list
1.阿里源 将下面所有内容复制,粘贴并覆盖sources.list文件中的所有内容
#deb包 deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # 源码 deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse ##测试版源 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse # Canonical 合作伙伴和附加 deb http://archive.canonical.com/ubuntu/ xenial partner deb http://extras.ubuntu.com/ubuntu/ xenial main
2.清华源
进入网址复制可更改系统版本:https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/
3 让更新源生效
sudo apt-get update
以上是关于ubuntu16.4 更换更新源的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu 16.4 server 修改网络接口名为 eth0