banner
NEWS LETTER

Linux更换国内源

Scroll down

本文作者:丁辉

Linux更换国内源

阿里镜像站

Centos更换国内源

  • Centos7

    1
    wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

Ubuntu更换国内源

  • 新版

    1
    2
    sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
    sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list
  • 旧版

    1
    2
    3
    4
    5
    6
    7
    8
    #中国科技大学
    sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
    #网易云163
    sed -i 's/deb.debian.org/mirrors.163.com/g' /etc/apt/sources.list
    #阿里云
    sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
    #清华同方
    sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
  • ARM版

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

Alpine更换国内源

  • 阿里云源

    1
    sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
  • 中国科技大学的源

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

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

I'm so cute. Please give me money.

其他文章
cover
Linux开启远程桌面连接
  • 70/01/01
  • 00:00
  • Linux-Docs
cover
Linux更改时区为24小时
  • 70/01/01
  • 00:00
  • Linux-Docs
目录导航 置顶
  1. 1. Linux更换国内源
    1. 1.1. Centos更换国内源
    2. 1.2. Ubuntu更换国内源
    3. 1.3. Alpine更换国内源
请输入关键词进行搜索