V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
sbldehanhan
V2EX  ›  Linux

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

  •  
  •   sbldehanhan · 194 天前 · 2597 次点击
    这是一个创建于 194 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    26 条回复    2023-10-19 11:03:03 +08:00
    cheng6563
        1
    cheng6563  
       194 天前
    ubuntu 桌面版是有自动选择当地源的功能的
    anytk
        2
    anytk  
       194 天前
    ubuntu 的 cn 源 http://cn.archive.ubuntu.com/ubuntu/ 你打开试试看?
    sbldehanhan
        3
    sbldehanhan  
    OP
       194 天前
    @cheng6563 #1 那它不会添加到 source.list 文件中吗?
    sbldehanhan
        4
    sbldehanhan  
    OP
       194 天前
    @anytk #2 这个怎么看?从哪儿看出来有清华源?
    czphoenix
        5
    czphoenix  
       194 天前
    /etc/apt/sources.list.d 里面也没有吗?
    dangyuluo
        6
    dangyuluo  
       194 天前
    是不是返回了一个 304 跳转
    sbldehanhan
        7
    sbldehanhan  
    OP
       194 天前
    @czphoenix #5 没有。我 grep 了整个 apt 目录,没有发现 tsinghua 的字段。
    sbldehanhan
        8
    sbldehanhan  
    OP
       194 天前
    @dangyuluo #6 没有。一切正常,可以更新缓存。我好奇他到底配置到哪儿了。
    ysc3839
        9
    ysc3839  
       194 天前 via Android
    看看/etc/apt/sources.list 内容?
    sbldehanhan
        10
    sbldehanhan  
    OP
       194 天前
    @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
        11
    vicacheung  
       194 天前
    @sbldehanhan 使用 cn 源会转到使用清华源
    sbldehanhan
        12
    sbldehanhan  
    OP
       194 天前
    @vicacheung #11 是吗?那以后是不是不需要手动换源了?
    263
        13
    263  
       194 天前   ❤️ 1
    cn.archive.ubuntu.com 是镜像归档,会判定包含在内的源,优先连接延迟最低的

    http://mirrors.ubuntu.com/CN.txt
    vicacheung
        14
    vicacheung  
       194 天前
    @sbldehanhan 是吧,有时候发现会使用阿里云作为 cn 源
    ziwen1943
        15
    ziwen1943  
       194 天前
    Ubuntumirror 会自行选择最快的 mirror 源获取 package list,这是 ubuntu 易用性设计,类似的 centos-fast-mirror 也会通过插件获取最快的 mirror 源,思路差不多,检测到你是默认的 mirror 之后就会给你自行遍历最快网络源,提高使用效率。
    ziwen1943
        16
    ziwen1943  
       194 天前
    ubuntu-server 版我没遇到这种,估摸是 desktop 页面插件内置逻辑实现的 mirror 遍历。
    laduary
        17
    laduary  
       194 天前
    看到帖子之后 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
    sbldehanhan
        19
    sbldehanhan  
    OP
       194 天前
    @unclemcz #18 我开代理不跳,关了代理就跳到清华源了。应该是楼上大哥说的那种机制。
    LinePro
        20
    LinePro  
       194 天前
    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/
    sbldehanhan
        21
    sbldehanhan  
    OP
       194 天前
    @ziwen1943 #16 了解了,感谢。
    unclemcz
        22
    unclemcz  
       194 天前 via Android
    @sbldehanhan 应该是 cn.archive.ubuntu 服务端控制回源地址的选择。
    totoro52
        23
    totoro52  
       194 天前
    新版本的 ubuntu 不用改源的了 默认会用国内的了
    sbldehanhan
        24
    sbldehanhan  
    OP
       193 天前
    @totoro52 #23 我的是 20.04 ,不是新版本,也会跳到清华源。应该是服务端做了重定位。
    asdf12303116
        25
    asdf12303116  
       193 天前
    我记得 cn.archive.ubuntu.com 这个域名是解析到 xtom 的镜像站的,xtom 镜像站 block 大陆 IP 地址,大陆 IP 会直接给 302 跳转到清华源
    sbldehanhan
        26
    sbldehanhan  
    OP
       192 天前
    @asdf12303116 #25 一直这样吗?还是最近改的?以前没注意,都是直接换国内源。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2664 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:36 · PVG 23:36 · LAX 08:36 · JFK 11:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.