zoukankan      html  css  js  c++  java
  • WSL Ubuntu修改软件源

    Win10 Windows Store中下载的WSL Ubuntu 18.04默认的源apt install下载速度异常缓慢,想替换成内部阿里云的替代源

    确认默认源

    首先查看默认的源的地址

    sudo vim /etc/apt/sources.list
    
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
    # deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
    # deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://archive.ubuntu.com/ubuntu/ bionic universe
    # deb-src http://archive.ubuntu.com/ubuntu/ bionic universe
    deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
    # deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates universe
    
    ...
    

    修改默认源

    首先将原配置文件备份

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.20181013
    

    然后VIM :,替换

    :%s/security.ubuntu/mirrors.aliyun/g
    :%s/archive.ubuntu/mirrors.aliyun/g
    

    更新

    sudo apt update
    

    再使用apt install速度就快多了

    参考

    https://mirrors.aliyun.com/about

    https://www.sunzhongwei.com/modify-the-wsl-ubuntu-1804-default-source-for-ali-cloud-images

  • 相关阅读:
    Github地址
    第三次冲刺12.16
    第三次冲刺12.07~12.15
    第二次冲刺11.24~12.03
    第十天
    照片
    最终总结
    app的推广
    第三个Sprint冲刺事后诸葛亮报告
    第三个Sprint团队贡献分
  • 原文地址:https://www.cnblogs.com/fw-qql/p/14518677.html
Copyright © 2011-2022 走看看