Skip to content

Commit 8a6ec9a

Browse files
authored
Update ubuntu.md, ubuntu-ports.md (#174)
add support for new deb822 format and fix typo Ref: sjtug/mirror-requests#378 https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
1 parent eab8cfb commit 8a6ec9a

File tree

2 files changed

+105
-3
lines changed

2 files changed

+105
-3
lines changed

content/post/mirror-help/ubuntu-ports.md

+58
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ author = "wdwang"
88

99
可使用`gedit`等文本编辑器修改`/etc/apt/sources.list`。修改后使用`sudo apt update`更新软件源。
1010

11+
从 Ubuntu 24.04 起,Ubuntu 的软件源配置文件变更为 DEB822 格式,在此格式下使用镜像源时,须注意替换`/etc/apt/sources.list`对应路径为`/etc/apt/sources.list.d/ubuntu.sources`
12+
1113
Ubuntu 18.04
1214

1315
```
@@ -56,4 +58,60 @@ deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-security main restricted univ
5658
# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse
5759
```
5860

61+
Ubuntu 24.04 (DEB822 格式) `/etc/apt/sources.list.d/ubuntu.sources`
62+
63+
```
64+
Types: deb
65+
URIs: https://mirror.sjtu.edu.cn/ubuntu/
66+
Suites: noble noble-updates noble-backports
67+
Components: main restricted universe multiverse
68+
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
69+
70+
# Types: deb-src
71+
# URIs: https://mirror.sjtu.edu.cn/ubuntu/
72+
# Suites: noble noble-updates noble-backports
73+
# Components: main restricted universe multiverse
74+
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
75+
76+
Types: deb
77+
URIs: https://mirror.sjtu.edu.cn/ubuntu/
78+
Suites: noble-security
79+
Components: main restricted universe multiverse
80+
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
81+
82+
# Types: deb-src
83+
# URIs: https://mirror.sjtu.edu.cn/ubuntu/
84+
# Suites: noble-security
85+
# Components: main restricted universe multiverse
86+
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
87+
88+
# Types: deb
89+
# URIs: https://mirror.sjtu.edu.cn/ubuntu/
90+
# Suites: noble-proposed
91+
# Components: main restricted universe multiverse
92+
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
93+
94+
# Types: deb-src
95+
# URIs: https://mirror.sjtu.edu.cn/ubuntu/
96+
# Suites: noble-proposed
97+
# Components: main restricted universe multiverse
98+
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
99+
```
100+
101+
Ubuntu 24.04 (旧格式,不推荐使用) `/etc/apt/sources.list`
102+
103+
```
104+
deb https://mirror.sjtu.edu.cn/ubuntu/ noble main restricted universe multiverse
105+
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble main restricted universe multiverse
106+
deb https://mirror.sjtu.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
107+
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
108+
deb https://mirror.sjtu.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
109+
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
110+
deb https://mirror.sjtu.edu.cn/ubuntu/ noble-security main restricted universe multiverse
111+
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-security main restricted universe multiverse
112+
113+
# deb https://mirror.sjtu.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse
114+
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse
115+
```
116+
59117
其中`deb-src`为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。

content/post/mirror-help/ubuntu.md

+47-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Ubuntu是一个基于Debian的Linux发行版,包含了常用的大量软件包
99

1010
SJTUG镜像源可以加速软件包的安装。
1111

12+
本镜像仅包含 32/64 位 x86 架构处理器的软件包,在 ARM(arm64, armhf)、PowerPC(ppc64el)、RISC-V(riscv64) 和 S390x 等架构的设备上(对应官方源为 ports.ubuntu.com)请使用 ubuntu-ports 镜像。
13+
1214
使用方式:
1315

1416
使用`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`即可。
@@ -19,6 +21,8 @@ SJTUG镜像源可以加速软件包的安装。
1921

2022
以下为修改后的镜像源列表文件的示例。可使用`gedit`等文本编辑器修改`/etc/apt/sources.list`。修改后使用`sudo apt update`更新软件源。
2123

24+
从 Ubuntu 24.04 起,Ubuntu 的软件源配置文件变更为 DEB822 格式,在此格式下使用镜像源时,须注意替换`/etc/apt/sources.list`对应路径为`/etc/apt/sources.list.d/ubuntu.sources`
25+
2226
Ubuntu 18.04
2327

2428
```
@@ -67,7 +71,47 @@ deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-security main restricted universe m
6771
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
6872
```
6973

70-
Ubuntu 24.04
74+
Ubuntu 24.04 (DEB822 格式) `/etc/apt/sources.list.d/ubuntu.sources`
75+
76+
```
77+
Types: deb
78+
URIs: https://mirror.sjtu.edu.cn/ubuntu/
79+
Suites: noble noble-updates noble-backports
80+
Components: main restricted universe multiverse
81+
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
82+
83+
# Types: deb-src
84+
# URIs: https://mirror.sjtu.edu.cn/ubuntu/
85+
# Suites: noble noble-updates noble-backports
86+
# Components: main restricted universe multiverse
87+
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
88+
89+
Types: deb
90+
URIs: https://mirror.sjtu.edu.cn/ubuntu/
91+
Suites: noble-security
92+
Components: main restricted universe multiverse
93+
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
94+
95+
# Types: deb-src
96+
# URIs: https://mirror.sjtu.edu.cn/ubuntu/
97+
# Suites: noble-security
98+
# Components: main restricted universe multiverse
99+
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
100+
101+
# Types: deb
102+
# URIs: https://mirror.sjtu.edu.cn/ubuntu/
103+
# Suites: noble-proposed
104+
# Components: main restricted universe multiverse
105+
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
106+
107+
# Types: deb-src
108+
# URIs: https://mirror.sjtu.edu.cn/ubuntu/
109+
# Suites: noble-proposed
110+
# Components: main restricted universe multiverse
111+
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
112+
```
113+
114+
Ubuntu 24.04 (旧格式,不推荐使用) `/etc/apt/sources.list`
71115

72116
```
73117
deb https://mirror.sjtu.edu.cn/ubuntu/ noble main restricted universe multiverse
@@ -79,8 +123,8 @@ deb https://mirror.sjtu.edu.cn/ubuntu/ noble-backports main restricted universe
79123
deb https://mirror.sjtu.edu.cn/ubuntu/ noble-security main restricted universe multiverse
80124
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-security main restricted universe multiverse
81125
82-
# deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
83-
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
126+
# deb https://mirror.sjtu.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse
127+
# deb-src https://mirror.sjtu.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse
84128
```
85129

86130
其中`deb-src`为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。

0 commit comments

Comments
 (0)