当前位置:   article > 正文

Ubuntu各个版本设置阿里云国内源_ubuntu curl 阿里源

ubuntu curl 阿里源

Ubuntu各个版本设置阿里云国内源

 

查看版本

获取debian系发行版的debian版本:
cat /etc/*version

Ubuntu版本debian版本号debian代号
14.048jessie
16.049strech
18.04-buster

busterstrech的之后的正式发行版代号,版本号按道理应该是10,但是好像官方没有说。

 

Ubuntu 14.04版/16.04版/18.04版 命令行一键替换

sudo curl -L https://github.com/AndyYoungDev/ubuntu-aliyun-sources/releases/download/shell/change.sh | bash

 

Ubuntu16.04版本

查找源配置文件 find / -name sources.list  ,修改sources.list为如下内容:

  1. deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
  2. deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
  3. deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
  4. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
  5. deb http://mirrors.aliyun.com/ubuntu/ xenial universe
  6. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
  7. deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
  8. deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
  9. deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
  10. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
  11. deb http://archive.canonical.com/ubuntu xenial partner
  12. deb-src http://archive.canonical.com/ubuntu xenial partner
  13. deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
  14. deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
  15. deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
  16. deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

执行命令  sudo apt-get update

 

Ubuntu18.04版本

查找源配置文件 find / -name sources.list  ,修改sources.list为如下内容:

  1. deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
  2. deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  4. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  6. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
  7. deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
  8. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
  9. deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
  10. deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

或者使用163源:

  1. #163
  2. deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
  3. deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
  4. deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
  5. deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
  6. deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
  7. deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
  8. deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
  9. deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
  10. deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
  11. deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

执行命令  sudo apt-get update

 

 

参考文章:https://yq.aliyun.com/articles/639051
参考文章:https://www.jianshu.com/p/352917274542 作者:Daryl_Xu

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号