首页
Portal
业界资讯
社区
BBS
我的家园
Space
个人空间
导读
Guide
登录
/
注册
用户名
Email
自动登录
找回密码
密码
登录
注册
搜索
搜索
本版
帖子
用户
本版
帖子
用户
帖子
好友
道具
勋章
收藏
任务
淘帖
门户
导读
设置
我的收藏
退出
腾讯QQ
微信登录
首页
›
≡≡网络技术≡≡
›
服务器
›
ubuntu18.04如何更新软件源(切换为国内软件源) ...
返回列表
linux
ubuntu18.04如何更新软件源(切换为国内软件源)
[ 复制链接 ]
灰儿
2023-5-18 17:14:54
ubuntu18.04如何更新软件源(切换为国内软件源)
Ubuntu系统18.04,在安装开发环境命令sudo apt update, sudo apt install build-essential时,进行软件更新的时候会发现速度非常的慢,这是因为软件源使用的是国外源的原因,使用国内的软件源在软件下载速度方面相对比较快。
具体操作方法如下:
1、使用快捷键【ctrl+alt+t】打开终端。
2、输入以下命令备份原有软件源文件。
cp /etc/apt/sources.list /etc/apt/sources.list.bak_yyyymmdd
3、再输入以下命令打开sources.list文件并添加新的软件源地址。
sudo vi /etc/apt/sources.list #打开sources.list文件
编辑/etc/apt/sources.list文件, 在文件最前面添加阿里云镜像源:
#阿里源地址
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
复制代码
其它源:
#中科大源地址
deb
https://mirrors.ustc.edu.cn/ubuntu/
bionic main restricted universe multiverse
deb-src
https://mirrors.ustc.edu.cn/ubuntu/
bionic main restricted universe multiverse
deb
https://mirrors.ustc.edu.cn/ubuntu/
bionic-updates main restricted universe multiverse
deb-src
https://mirrors.ustc.edu.cn/ubuntu/
bionic-updates main restricted universe multiverse
deb
https://mirrors.ustc.edu.cn/ubuntu/
bionic-backports main restricted universe multiverse
deb-src
https://mirrors.ustc.edu.cn/ubuntu/
bionic-backports main restricted universe multiverse
deb
https://mirrors.ustc.edu.cn/ubuntu/
bionic-security main restricted universe multiverse
deb-src
https://mirrors.ustc.edu.cn/ubuntu/
bionic-security main restricted universe multiverse
deb
https://mirrors.ustc.edu.cn/ubuntu/
bionic-proposed main restricted universe multiverse
deb-src
https://mirrors.ustc.edu.cn/ubuntu/
bionic-proposed main restricted universe multiverse
#163源地址
deb
http://mirrors.163.com/ubuntu/
bionic main restricted universe multiverse
deb
http://mirrors.163.com/ubuntu/
bionic-security main restricted universe multiverse
deb
http://mirrors.163.com/ubuntu/
bionic-updates main restricted universe multiverse
deb
http://mirrors.163.com/ubuntu/
bionic-proposed main restricted universe multiverse
deb
http://mirrors.163.com/ubuntu/
bionic-backports main restricted universe multiverse
deb-src
http://mirrors.163.com/ubuntu/
bionic main restricted universe multiverse
deb-src
http://mirrors.163.com/ubuntu/
bionic-security main restricted universe multiverse
deb-src
http://mirrors.163.com/ubuntu/
bionic-updates main restricted universe multiverse
deb-src
http://mirrors.163.com/ubuntu/
bionic-proposed main restricted universe multiverse
deb-src
http://mirrors.163.com/ubuntu/
bionic-backports main restricted universe multiverse
#清华源地址
deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic main restricted universe multiverse
deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic main restricted universe multiverse
deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic-updates main restricted universe multiverse
deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic-updates main restricted universe multiverse
deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic-backports main restricted universe multiverse
deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic-backports main restricted universe multiverse
deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic-security main restricted universe multiverse
deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic-security main restricted universe multiverse
deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic-proposed main restricted universe multiverse
deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
bionic-proposed main restricted universe multiverse
4、最后输入命令更新系统软件源地址即可。
更新软件列表,运行如下命令:
sudo apt-get update
更新软件包,运行如下命令:
sudo apt-get upgrade
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
回复
本版积分规则
回帖后跳转到最后一页
灰儿
管理员
9832篇
主题总数
7
总热度
提问
+关注
产品动态
2024-04-29
网御星云入侵防护系统_V6000流量控制配置实例
2024-04-23
电子书在线阅读和下载网址推荐
2024-04-23
泛微(weaver)e-cology_V10公文管理,公文环节(过程定义)设置
2024-04-23
泛微(weaver)e-cology_V10公文管理,收文单位隐藏下级单位
2024-04-20
《再次成为神》免费下载观看
2024-04-20
《為甚麼會有人類》
2024-04-16
Linux下查询文件夹中文件数量的方法
2024-04-16
一款超级好用的Linux系统远程连接工具——FinalShell
热点推荐
1
网御星云入侵防护系统_V6000流量控制配置实例
2
电子书在线阅读和下载网址推荐
3
泛微(weaver)e-cology_V10公文管理,公文环节(过程定义)设置
4
泛微(weaver)e-cology_V10公文管理,收文单位隐藏下级单位
5
《再次成为神》免费下载观看
6
《為甚麼會有人類》
7
Linux下查询文件夹中文件数量的方法
8
一款超级好用的Linux系统远程连接工具——FinalShell
热门板块
PC操作系统
启动和引导
手机操作系统
硬件相关
办公软件
多媒体技术
产品动态
2024-04-29
网御星云入侵防护系统_V6000流量控制配置实例
2024-04-23
电子书在线阅读和下载网址推荐
2024-04-23
泛微(weaver)e-cology_V10公文管理,公文环节(过程定义)设置
2024-04-23
泛微(weaver)e-cology_V10公文管理,收文单位隐藏下级单位
2024-04-20
《再次成为神》免费下载观看
2024-04-20
《為甚麼會有人類》
2024-04-16
Linux下查询文件夹中文件数量的方法
2024-04-16
一款超级好用的Linux系统远程连接工具——FinalShell
热点推荐
1
网御星云入侵防护系统_V6000流量控制配置实例
2
电子书在线阅读和下载网址推荐
3
泛微(weaver)e-cology_V10公文管理,公文环节(过程定义)设置
4
泛微(weaver)e-cology_V10公文管理,收文单位隐藏下级单位
5
《再次成为神》免费下载观看
6
《為甚麼會有人類》
7
Linux下查询文件夹中文件数量的方法
8
一款超级好用的Linux系统远程连接工具——FinalShell
热门板块
PC操作系统
启动和引导
手机操作系统
硬件相关
办公软件
多媒体技术
学习中心
站长自定义文字内容,利用碎片时间,随时随地获取优质内容。
Q设计语言
了解更多
Q Design 提供商家设计所需的指导与资源,帮商家快速完成产品设计、降低生产成本。
学习中心
站长自定义文字内容,利用碎片时间,随时随地获取优质内容。
Q设计语言
了解更多
Q Design 提供商家设计所需的指导与资源,帮商家快速完成产品设计、降低生产成本。