Ubuntu更换apt镜像源

1. 手动更改

  1. 备份镜像源

    cd /etc/apt
    cp sources.list sources.list.bak
    
  2. 修改镜像源

    sudo vim sources.list
    
    # 复制粘贴下面镜像源,保存退出
    deb http://mirrors.aliyun.com/ubuntu/ xenial main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
    deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
    
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
    deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
    deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
    
  3. 更新镜像源

    sudo apt-get update
    

2. 自动更改

image-20200211171321121

posted @ 2020-02-11 17:16  凯旋.Lau  阅读(1864)  评论(2)    收藏  举报