Skip to content

Commit 2831e1b

Browse files
committed
save: ubuntu china source.
1 parent 6606a65 commit 2831e1b

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# 工程笔记
22

3-
## 目录
3+
## Linux
44

5-
### Go
5+
[Ubuntu - 切换到中国源](linux/ubuntu-china-source.md)
6+
7+
## Go
68

79
[设置代理加速国内源](go/go-proxy-qiniu.md)
810

9-
### Python
11+
## Python
1012

1113
[打包并发布包到 PyPI](python/build-and-publish-package-to-pypi.md)
1214

linux/ubuntu-china-source.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Ubuntu - 切换到中国源
2+
3+
以下方案同样适用于 WSL2 上的 Ubuntu。
4+
5+
## 华为云
6+
7+
```bash
8+
sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.bak && \
9+
sudo sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list && \
10+
sudo sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list && \
11+
sudo apt-get update
12+
```
13+
14+
## 阿里云
15+
16+
```bash
17+
sudo cp -a /etc/apt/sources.list /etc/apt/sources.list.bak && \
18+
sudo sed -i "s@http://.*archive.ubuntu.com@http://mirrors.aliyun.com@g" /etc/apt/sources.list && \
19+
sudo sed -i "s@http://.*security.ubuntu.com@http://mirrors.aliyun.com@g" /etc/apt/sources.list && \
20+
sudo apt-get update
21+
```

0 commit comments

Comments
 (0)