From b05efb3c9cca3019102de72de5cfb5aea143a95f Mon Sep 17 00:00:00 2001 From: wohenbushuang Date: Fri, 12 Jul 2024 09:08:08 +0800 Subject: [PATCH] Update ubuntu.md --- content/post/mirror-help/ubuntu.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/content/post/mirror-help/ubuntu.md b/content/post/mirror-help/ubuntu.md index 838c6cc..9460cd8 100644 --- a/content/post/mirror-help/ubuntu.md +++ b/content/post/mirror-help/ubuntu.md @@ -11,11 +11,11 @@ SJTUG镜像源可以加速软件包的安装。 使用方式: -使用`sudo nano /etc/apt/sources.list`打开镜像源列表文件。将类似于`http://cn.archive.ubuntu.com/ubuntu`或`http://cn.archive.ubuntu.com/ubuntu`的地址改成`https://mirror.sjtu.edu.cn/ubuntu`,之后按`Ctrl-O 回车`保存,按`Ctrl-X`退出。最后执行`sudo apt update`即可。 +使用`sudo nano /etc/apt/sources.list`打开镜像源列表文件。将类似于`http://archive.ubuntu.com/ubuntu`或`http://cn.archive.ubuntu.com/ubuntu`的地址改成`https://mirror.sjtu.edu.cn/ubuntu`,之后按`Ctrl-O 回车`保存,按`Ctrl-X`退出。最后执行`sudo apt update`即可。 镜像站一天同步一次 Ubuntu 镜像。为了取得最新的安全更新,我们不建议您将 `security.ubuntu.com` 换成镜像源。 -您也可使用`sudo sed -i 's/http:\/\/cn.archive.ubuntu.com/https:\/\/mirror.sjtu.edu.cn/g' /etc/apt/sources.list`指令直接批量修改。 +您也可使用`sudo sed -i 's/http:\/\/archive.ubuntu.com/https:\/\/mirror.sjtu.edu.cn/g' /etc/apt/sources.list`或`sudo sed -i 's/http:\/\/cn.archive.ubuntu.com/https:\/\/mirror.sjtu.edu.cn/g' /etc/apt/sources.list`指令直接批量修改。 以下为修改后的镜像源列表文件的示例。可使用`gedit`等文本编辑器修改`/etc/apt/sources.list`。修改后使用`sudo apt update`更新软件源。 @@ -67,4 +67,20 @@ deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-security main restricted universe m # deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse ``` +Ubuntu 24.04 + +``` +deb https://mirror.sjtu.edu.cn/ubuntu/ noble main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ noble-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ noble-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ noble-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse +``` + 其中`deb-src`为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。