Ubuntu14.04和Ubuntu16.04更换阿里源的方法

所属分类: 操作系统 / unix linux 阅读数: 144
收藏 0 赞 0 分享

换成国内最快的阿里云源

第一步:备份原来的源文件

cd /etc/apt/ 

然后会显示下面的源文件sources.list

输入命令

sudo cp sources.list sources.list.bak 

就是将sources.list备份到sources.list.bak

第二步:替换源

阿里云源的文件

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 

替换并保存

sudo gedit sources.list打开文件,替换成阿里云文件即可

第三步:更新源和软件

   sudo apt-get update 更新源 
   sudo apt-get upgrade 更新软件

以上所述是小编给大家介绍的Ubuntu14.04和Ubuntu16.04更换阿里源的方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

更多精彩内容其他人还在看

给Linux新手[系列之五]

给Linux新手[系列之五]
收藏 0 赞 0 分享

给Linux新手[系列之四]

给Linux新手[系列之四]
收藏 0 赞 0 分享

给Linux新手[系列之三]

给Linux新手[系列之三]
收藏 0 赞 0 分享

什么是Linux

什么是Linux
收藏 0 赞 0 分享

利用shell编程实现DOS风格的Linux命令行

利用shell编程实现DOS风格的Linux命令行
收藏 0 赞 0 分享

Linux中流媒体Helix Server的安装和配置

Linux中流媒体Helix Server的安装和配置
收藏 0 赞 0 分享

Linux系统文件命令精通指南(上)

Linux系统文件命令精通指南(上)
收藏 0 赞 0 分享

Linux系统文件命令精通指南(下)

Linux系统文件命令精通指南(下)
收藏 0 赞 0 分享

Linux系统中防火墙的框架分析

Linux系统中防火墙的框架分析
收藏 0 赞 0 分享

Linux下中文字体的安装

Linux下中文字体的安装
收藏 0 赞 0 分享
查看更多