当前位置:   article > 正文

使用sed更换常用软件源(ubuntu、debian、alpine、pip、npm)_软件源 sed

软件源 sed

以下是常用系统或编程语言的替换国内源的方法

ubuntu

中科大软件源

sed -i 's#http://archive.ubuntu.com#https://mirrors.ustc.edu.cn#g' /etc/apt/sources.list
sed -i 's#http://security.ubuntu.com#https://mirrors.ustc.edu.cn#g' /etc/apt/sources.list
  • 1
  • 2

ubuntu(arm)

sed -i 's/ports.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
  • 1

debian12

sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/mirrors/debian.list
sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/mirrors/debian-security.list
  • 1
  • 2

debian

sed -i 's#http://deb.debian.org#https://mirrors.ustc.edu.cn#g' /etc/apt/sources.list
sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
  • 1
  • 2

alpine

sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
  • 1

pip

pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple
  • 1

npm

npm config set registry https://registry.npm.taobao.org
  • 1

yarn

yarn config set registry https://registry.npm.taobao.org/
  • 1

openwrt

sed -i 's_downloads.openwrt.org_mirrors.tuna.tsinghua.edu.cn/openwrt_' /etc/opkg/distfeeds.conf
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/480833
推荐阅读
相关标签
  

闽ICP备14008679号