linux镜像源更新的两种办法

  1. 通过终端打开source.list文件复制镜像源代码更新
    1)输入命令vi /etc/apt/sources.list 打开文件
    2)在文件开头添加以下代码(此代码为阿里源)
    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    3)运行以下命令
    sudo apt-get update
    sudo apt-get upgrade

  2. 通过图形界面更新
    设置——打开软件更新
    linux镜像源更新的两种办法_第1张图片在download from那里选择阿里源或其他源,点击关闭后下载更新即可

你可能感兴趣的:(linux镜像源更新的两种办法)