ubuntu更换国内镜像源,下载增速

20 篇文章 0 订阅

方法一:通过脚本更换源 1.备份原来的源

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

将原来的源保留一下,以后想用还可以继续用 2.更换源

sudo gedit /etc/apt/sources.list

使用gedit打开文档,将下面的阿里源复制进去,点击保存然后关闭文件 阿里源

deb ubuntu安装包下载_开源镜像站-阿里云 xenial main deb-src ubuntu安装包下载_开源镜像站-阿里云 xenial main

deb ubuntu安装包下载_开源镜像站-阿里云 xenial-updates main deb-src ubuntu安装包下载_开源镜像站-阿里云 xenial-updates main

deb ubuntu安装包下载_开源镜像站-阿里云 xenial universe deb-src ubuntu安装包下载_开源镜像站-阿里云 xenial universe deb ubuntu安装包下载_开源镜像站-阿里云 xenial-updates universe deb-src ubuntu安装包下载_开源镜像站-阿里云 xenial-updates universe

deb ubuntu安装包下载_开源镜像站-阿里云 xenial-security main deb-src ubuntu安装包下载_开源镜像站-阿里云 xenial-security main deb ubuntu安装包下载_开源镜像站-阿里云 xenial-security universe deb-src ubuntu安装包下载_开源镜像站-阿里云 xenial-security universe

image-20240403141129459

点击右上角,会有提示让保存

3.更新 更新源

sudo apt-get update

image-20240403141412869

复损坏的软件包,尝试卸载出错的包,重新安装正确版本的

sudo apt-get -f install

更新软件

 sudo apt-get upgrade

image-20240403141607621

4.其他常用的源 清华源

deb Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror xenial main restricted universe multiverse

deb-src Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror xenial main restricted universe multiverse

deb Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror xenial-updates main restricted universe multiverse

deb-src Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror xenial-updates main restricted universe multiverse

deb Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror xenial-backports main restricted universe multiverse

deb-src Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror xenial-backports main restricted universe multiverse

deb Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror xenial-security main restricted universe multiverse

deb-src Index of /ubuntu/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror xenial-security main restricted universe multiverse

网易源

deb Index of /ubuntu/ wily main restricted universe multiverse deb Index of /ubuntu/ wily-security main restricted universe multiverse deb Index of /ubuntu/ wily-updates main restricted universe multiverse deb Index of /ubuntu/ wily-proposed main restricted universe multiverse deb Index of /ubuntu/ wily-backports main restricted universe multiverse deb-src Index of /ubuntu/ wily main restricted universe multiverse deb-src Index of /ubuntu/ wily-security main restricted universe multiverse deb-src Index of /ubuntu/ wily-updates main restricted universe multiverse deb-src Index of /ubuntu/ wily-proposed main restricted universe multiverse deb-src Index of /ubuntu/ wily-backports main restricted universe multiverse

  • 22
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Ubuntu国内镜像源更新可以通过以下步骤来完成: 1. 打开终端,输入命令sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak,备份源列表。 2. 输入命令sudo gedit /etc/apt/sources.list,编辑源列表。 3. 将原有的源列表注释掉,添加以下内容: ``` #阿里云源 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src 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-backports main restricted universe multiverse ``` 4. 保存并退出。 5. 输入命令sudo apt-get update,更新源列表。 6. 输入命令sudo apt-get upgrade,更新系统。 7. 完成。 注意:以上步骤适用于Ubuntu 18.04版本,其他版本可能略有不同。建议在更改源列表前备份并谨慎操作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值