Ubuntu20.04.5 没有配置清华源, update 什么是清华源?

207 天前
 sbldehanhan

就是刚装完,没有任何修改。apt 目录下也没有 singhua 字样。但是用 apt update 输出显示有 tsinghua 源。咋回事?

2627 次点击
所在节点    Linux
26 条回复
cheng6563
207 天前
ubuntu 桌面版是有自动选择当地源的功能的
anytk
207 天前
ubuntu 的 cn 源 http://cn.archive.ubuntu.com/ubuntu/ 你打开试试看?
sbldehanhan
207 天前
@cheng6563 #1 那它不会添加到 source.list 文件中吗?
sbldehanhan
207 天前
@anytk #2 这个怎么看?从哪儿看出来有清华源?
czphoenix
207 天前
/etc/apt/sources.list.d 里面也没有吗?
dangyuluo
207 天前
是不是返回了一个 304 跳转
sbldehanhan
207 天前
@czphoenix #5 没有。我 grep 了整个 apt 目录,没有发现 tsinghua 的字段。
sbldehanhan
207 天前
@dangyuluo #6 没有。一切正常,可以更新缓存。我好奇他到底配置到哪儿了。
ysc3839
207 天前
看看/etc/apt/sources.list 内容?
sbldehanhan
207 天前
@ysc3839 #9
```
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ focal universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal universe
deb http://cn.archive.ubuntu.com/ubuntu/ focal-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ focal multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ focal-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
```
都是自带的,我没改过。
vicacheung
207 天前
@sbldehanhan 使用 cn 源会转到使用清华源
sbldehanhan
207 天前
@vicacheung #11 是吗?那以后是不是不需要手动换源了?
263
207 天前
cn.archive.ubuntu.com 是镜像归档,会判定包含在内的源,优先连接延迟最低的

http://mirrors.ubuntu.com/CN.txt
vicacheung
207 天前
@sbldehanhan 是吧,有时候发现会使用阿里云作为 cn 源
ziwen1943
207 天前
Ubuntumirror 会自行选择最快的 mirror 源获取 package list,这是 ubuntu 易用性设计,类似的 centos-fast-mirror 也会通过插件获取最快的 mirror 源,思路差不多,检测到你是默认的 mirror 之后就会给你自行遍历最快网络源,提高使用效率。
ziwen1943
207 天前
ubuntu-server 版我没遇到这种,估摸是 desktop 页面插件内置逻辑实现的 mirror 遍历。
laduary
207 天前
看到帖子之后 ping 了一下,cn.archive.ubuntu.com 这个域名被解析到 mirror.xtom.com.hk 上了。而且 xtom 这个镜像不在 http://mirrors.ubuntu.com/CN.txt 列表上。我记得 xtom 镜像是屏蔽大陆访问的。

用全国 ping 工具又试了一下,发现统一解析到 xtom 了。https://www.itdog.cn/ping/cn.archive.ubuntu.com
unclemcz
207 天前
sbldehanhan
207 天前
@unclemcz #18 我开代理不跳,关了代理就跳到清华源了。应该是楼上大哥说的那种机制。
LinePro
207 天前
curl.exe -vvv http://cn.archive.ubuntu.com/ubuntu/
* Trying [2403:2c80:5::6]:80...
* Connected to cn.archive.ubuntu.com (2403:2c80:5::6) port 80 (#0)
> GET /ubuntu/ HTTP/1.1
> Host: cn.archive.ubuntu.com
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 302 Moved Temporarily
< Server: nginx
< Date: Tue, 17 Oct 2023 06:35:57 GMT
< Content-Type: text/html
< Content-Length: 138
< Connection: keep-alive
< Location: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/982665

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX