美文网首页
ubuntu16.04 源替换

ubuntu16.04 源替换

作者: 链巴 | 来源:发表于2018-04-28 22:15 被阅读0次

适用系统
ubuntu16.04系统

  1. root权限进入路径查看当前的源代码
cd /etc/apt
  1. 查看文件夹内是否存在sources.list的文件,并且备份sources.list文件为sources.list.backup,我们有备无患
cp sources.list sources.list.backup
  1. ls看下我们的文件里面是否存在sources.list.backup,有的话就证明我们备份成功了。
  2. 修改sources.list配置文件,通过下面命令打开,并将里面内容删除,因为我们已经备份了,所以大胆的删除
gedit sources.list
  1. 直接粘贴下面的源,地址是https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/,清华大学开源软件镜像站
# 默认注释了源码镜像以提高 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

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
  1. 保存,退出
  2. 执行命令apt update开始更新源,这个需要几分钟时间,耐心等待

相关文章

  • ubuntu16.04替换源

    网上很多替换源都有错刚好今天找到了一个可以用的源 用的是阿里巴巴的软件源

  • ubuntu16.04 源替换

    适用系统ubuntu16.04系统 在root权限进入路径查看当前的源代码 查看文件夹内是否存在sources.l...

  • 4.DockerFile初级编写

    本文是以Ubuntu16.04作为基础镜像,并对此镜像做出一些修改: 修改内容如下:1.替换镜像源为阿里源。2.安...

  • Ubuntu16.04 替换阿里云软件源

    一,备份原来的源文件 1,首先,进入源文件 sources.list 所在的目录: 2,执行sudo cp sou...

  • node.js安装

    一、替换Home-brew源 替换Homebrew默认源 替换Homebrew-core源 二、通过Homebre...

  • Brew 源的替换

    替换 USTC 镜像 1、替换Homebrew源 重置: 2、替换homebrew-core源 重置: 3、替换h...

  • 替换 pip 默认镜像源

    1、Linux 替换 pip 默认镜像源: 2、Windows 替换 pip 默认镜像源: Python源: py...

  • emacs操作 - 插件篇

    替换软件源 使用emacs默认软件源安装软件速度比较慢,国内的用户一般需要替换软件源,这里我将软件源替换为清华镜像...

  • CocoaPods安装记录

    1. 替换Ruby源 将默认的 RubyGems 替换为ruby-china源 先检查源 结果 移除旧源 添加ru...

  • 替换重置Homebrew源

    做个记录 替换Homebrew Bottles源: 参考:替换Homebrew Bottles源 在中科大源失效或...

网友评论

      本文标题:ubuntu16.04 源替换

      本文链接:https://www.haomeiwen.com/subject/eqvnlftx.html