微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ubuntu更换国内软件源,附上几个国内软件源

1,备份系统认的源(没有root权限的前面加sudo) cp /etc/apt/sources.list /etc/apt/sources.list.bak 2,修改/etc/apt/sources.list (没有root权限的前面加sudo)(这里是阿里源) >/etc/apt/sources.list cat >>/etc/apt/sources.list<<EOF # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse EOF 3,执行更新 apt-get update ****不执行是不生效的 附上几个国内源: 1.东北大学: deb-src http://mirror.neu.edu.cn/ubuntu/ xenial main restricted #Added by software-properties deb http://mirror.neu.edu.cn/ubuntu/ xenial main restricted deb-src http://mirror.neu.edu.cn/ubuntu/ xenial restricted multiverse universe #Added by software-properties deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates main restricted deb-src http://mirror.neu.edu.cn/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties deb http://mirror.neu.edu.cn/ubuntu/ xenial universe deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates universe deb http://mirror.neu.edu.cn/ubuntu/ xenial multiverse deb http://mirror.neu.edu.cn/ubuntu/ xenial-updates multiverse deb http://mirror.neu.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirror.neu.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirror.neu.edu.cn/ubuntu/ xenial-security main restricted deb-src http://mirror.neu.edu.cn/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties deb http://mirror.neu.edu.cn/ubuntu/ xenial-security universe deb http://mirror.neu.edu.cn/ubuntu/ xenial-security multiverse 2.清华大学: # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse 3.搜狐 deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted deb http://mirrors.sohu.com/ubuntu/ precise universe deb-src http://mirrors.sohu.com/ubuntu/ precise universe deb http://mirrors.sohu.com/ubuntu/ precise-updates universe deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe deb http://mirrors.sohu.com/ubuntu/ precise multiverse deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse 转载地址: http://blog.csdn.net/paincupid/article/details/52895676 http://blog.csdn.net/Hehailiang_Dream/article/details/54094634

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐