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
  • 相关阅读:
    四十四 常用内建模块 struct
    四十三 常用内建模块 base64
    Django Haystack 全文检索与关键词高亮
    python实现简单tftp(基于udp)
    多线程socket UDP收发数据
    Python 线程复习
    python 进程复习
    python pdb 调试
    Linux 复习
    Django 博客
  • 原文地址:https://www.cnblogs.com/kehaimin/p/8616057.html
Copyright © 2011-2022 走看看