Linux ubuntu修改软件源为国内源;解决apt install、PPA源太慢; 您所在的位置:网站首页 river歌曲歌词音译 Linux ubuntu修改软件源为国内源;解决apt install、PPA源太慢;

Linux ubuntu修改软件源为国内源;解决apt install、PPA源太慢;

2023-11-08 23:07| 来源: 网络整理| 查看: 265

阿里源

修改为阿里源,只需要执行命令:

sed -i 's/\/\/.*\/ubuntu/\/\/mirrors.aliyun.com\/ubuntu/g' /etc/apt/sources.list

原理就是使用sed命令将文件/etc/apt/sources.list中的网址替换成阿里源网址。

其他源

只需将上面命令中mirrors.aliyun.com替换即可。

中科大源 sed -i 's/\/\/.*\/ubuntu/\/\/mirrors.ustc.edu.cn\/ubuntu/g' /etc/apt/sources.list 浙江大学 sed -i 's/\/\/.*\/ubuntu/\/\/mirrors.zju.edu.cn\/ubuntu/g' /etc/apt/sources.list 网易源 sed -i 's/\/\/.*\/ubuntu/\/\/mirrors.163.com\/ubuntu/g' /etc/apt/sources.list PPA源

PPA源可以理解成第三方源。有些软件在ubuntu官方软件源是没有的,但在PPA源里就可能有。但PPA的默认源也是国外的,访问很慢。

cd /etc/apt/sources.list.d

可以看到ppa源列表文件(以.list结尾的),编辑,将其中的http://ppa.launchpad.net替换为http://launchpad.proxy.ustclug.org。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有