首页 > 系统服务 > 详细

Linux - Ubuntu18.04下更改apt源为阿里云源

时间:2020-04-07 23:42:14      阅读:84      评论:0      收藏:0      [点我收藏+]

进入apt目录,备份原来的源地址

cd /etc/apt
mv ./source.list ./source.list.bak

 

 

修改源文件source.list

vim source.list

 

更换阿里云源

deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe 
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe 
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe 
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe 
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe

 :wq 保存退出即可

 

更新源

sudo apt-get update

 

也可以全局更新

sudo apt-get upgrade

但这个很耗时,执行上面那一条就可以了

Linux - Ubuntu18.04下更改apt源为阿里云源

原文:https://www.cnblogs.com/poloyy/p/12656883.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!