王杺勃 發表於 2023-9-25 10:14:00

Debian 12 更换国内/本地源

<p></p><div class="toc"><div class="toc-container-header">目录</div><ul><li>修改源</li><li>阿里云源</li><li>清华大学源(写该文章时有问题)</li><li>中科大源</li><li>网易源</li><li>腾讯云源</li><li>把本地光盘当做源来使用</li><li>更新源</li></ul></div><p></p>
<h1 id="修改源">修改源</h1>
<p><font color="red"><strong>vim /etc/apt/sources.list</strong></font></p>
<h1 id="阿里云源">阿里云源</h1>
<pre><code class="language-shell">deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
</code></pre>
<h1 id="清华大学源写该文章时有问题">清华大学源(写该文章时有问题)</h1>
<pre><code class="language-shell">deb https://mirrors.tsinghua.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.tsinghua.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.tsinghua.edu.cn/debian-security/ bookworm-security main
deb-src https://mirrors.tsinghua.edu.cn/debian-security/ bookworm-security main
deb https://mirrors.tsinghua.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.tsinghua.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.tsinghua.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.tsinghua.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
</code></pre>
<h1 id="中科大源">中科大源</h1>
<pre><code class="language-shell">deb https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
</code></pre>
<h1 id="网易源">网易源</h1>
<pre><code class="language-shell">deb https://mirrors.163.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.163.com/debian-security/ bookworm-security main
deb-src https://mirrors.163.com/debian-security/ bookworm-security main
deb https://mirrors.163.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.163.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm-backports main non-free non-free-firmware contrib
</code></pre>
<h1 id="腾讯云源">腾讯云源</h1>
<pre><code class="language-shell">deb https://mirrors.cloud.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.cloud.tencent.com/debian-security/ bookworm-security main
deb-src https://mirrors.cloud.tencent.com/debian-security/ bookworm-security main
deb https://mirrors.cloud.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.cloud.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
</code></pre>
<h1 id="把本地光盘当做源来使用">把本地光盘当做源来使用</h1>
<pre><code class="language-shell">rambo@test1:~$ sudo vim /etc/apt/sources.list
# 在第一行插入下行内容
deb file:///mnt/usb1bookworm   mainnon-free-firmware


# 挂载光盘
rambo@test1:~$ mkdir /mnt/usb1
rambo@test1:~$ mount /dev/sr0   /mnt/usb1

</code></pre>
<h1 id="更新源">更新源</h1>
<pre><code class="language-shell">sudo apt update
</code></pre><br><br>
来源:https://www.cnblogs.com/smlile-you-me/p/17727308.html
頁: [1]
查看完整版本: Debian 12 更换国内/本地源