码迷,mamicode.com
首页 > 系统相关 > 详细

4.ubuntu换源

时间:2020-05-29 09:54:05      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:sed   xen   upd   中科大   ports   bsp   删除   默认   str   

ubuntu换源

目的:ubuntu默认的源是国外的,使用apt-get的时候很慢,换成国内的源可以在安装软件时快很多很多。我用的是ubuntu16.04。

 

相关文件: /etc/apt/sources.list

 

步骤:

(1).先备份这个文件(以防以后需要)

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

(2).将文件中内容换成其他源(选一个源就行)

sudo nano /etc/apt/sources.list   ,把以前的内容删除,从下边的源中选一个复制粘贴。ctrl+O保存,回车 确认,ctrl+X退出,即可。(注:有的时候某个源换了也不好用,那就再换个别的试试)

(3).命令行运行 sudo apt-get update ,更新一下就行了。

 

 

阿里源

deb http://mirrors.aliyun.com/ubuntu/ xenial main

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main

 

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main

 

deb http://mirrors.aliyun.com/ubuntu/ xenial universe

deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

 

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main

deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

 

 

 

清华源

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

 

 

中科大源

    deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe

    deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe

    deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe

    deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe

    deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe

    deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe

 

其他源自行百度

4.ubuntu换源

标签:sed   xen   upd   中科大   ports   bsp   删除   默认   str   

原文地址:https://www.cnblogs.com/zsy-xmfc/p/12302931.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!