Ubuntu更换apt镜像源

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. 自动更改

Ubuntu更换apt镜像源_第1张图片

你可能感兴趣的:(Ubuntu更换apt镜像源)