Ubuntu 24.04版本中的镜像源更换

Ubuntu 24.04版本中的镜像源更换、网口与网络配置
一、镜像源更换
24.04 版本开始 Ubuntu 系统源文件改用 /etc/apt/sources.list.d/ubuntu.sources

# 备份源文件
sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak

# 编辑源文件
sudo vim /etc/apt/sources.list.d/ubuntu.sources
1
2
3
4
5
源配置的内容如下:

Types: deb
URIs: http://cn.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
1
2
3
4
5
6
7
8
9
10
11
源配置可以注释掉,更改为下面其中一个源:

#Types: deb
#URIs: http://cn.archive.ubuntu.com/ubuntu/
#Suites: noble noble-updates noble-backports
#Components: main restricted universe multiverse
#Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

#Types: deb
#URIs: http://security.ubuntu.com/ubuntu/
#Suites: noble-security
#Components: main restricted universe multiverse
#Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# 更改为 阿里源
Types: deb deb-src
URIs: https://mirrors.aliyun.com/ubuntu/
Suites: noble noble-security noble-updates noble-proposed noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#Types: deb
#URIs: http://cn.archive.ubuntu.com/ubuntu/
#Suites: noble noble-updates noble-backports
#Components: main restricted universe multiverse
#Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

#Types: deb
#URIs: http://security.ubuntu.com/ubuntu/
#Suites: noble-security
#Components: main restricted universe multiverse
#Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# 更改为 清华源
Types: deb deb-src
URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu/
Suites: noble noble-security noble-updates noble-proposed noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

posted @ 2024-09-25 10:57  Thenext  阅读(2229)  评论(1编辑  收藏  举报