zoukankan      html  css  js  c++  java
  • ubuntu 更换更新源

    贴上内容来源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
  • 相关阅读:
    OpenShift
    ant exec
    深入了解Ant构建工具 命令
    防止sql注入和跨站脚本攻击,跨站请求伪造以及一句话木马的学习记录
    Web攻防之XSS,CSRF,SQL注入(转)
    sublime text常用快捷键(转)
    fiddler使用心得记录
    python+tesseract验证码识别的一点小心得
    window脚本命令学习(转)
    python发送邮件(转)
  • 原文地址:https://www.cnblogs.com/kehaimin/p/8616057.html
Copyright © 2011-2022 走看看