• Ubuntu20.04更换软件源


    默认情况下ubuntu所自带软件仓库原链接在国外,加在缓慢。需要更换国内软件源。

    vi打开存放软件源的文件,sources.list为软件源存放文件。

     vi /etc/apt/sources.list

    添加软件源链接:

    #添加阿里源
    
    deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
    
    #添加清华源
    
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
    
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
    
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
    
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
    
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
    
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
    
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
    
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse multiverse

    :wq保存退出后

    更新源

    sudo apt-get update

    更新软件:

    sudo apt-get upgrade

    作者:运维密码
    出处:https://mefj.com.cn/
    本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
    如果文中有什么错误,欢迎指出。以免更多的人被误导。

         扫一扫 运维公众号

  • 相关阅读:
    将备份中的数据插入到数据库中的具体步骤
    C#三层架构(获取中文拼音和给密码加密)
    C# 三层架构项目体会(1)
    leetcode——Best Time to Buy and Sell Stock
    leetcode——Binary Tree Maximum Path Sum
    leetcode——Valid Palindrome
    leetcode——Word Ladder II
    学习制作SLG游戏(一)
    leetcode——Maximum Gap
    cocos2d学习资源收集
  • 原文地址:https://www.cnblogs.com/mefj/p/15176158.html
Copyright © 2020-2023  润新知