赞
踩
本文主要使用 清华大学开源软件镜像站
AMD(X64和X86架构) 和 ARM 版 Ubuntu 更换镜像源的步骤是一致的,区别在于架构不同,镜像地址会不同,但是操作一模一样,接下来将链接地址和镜像内容都附上。
x86架构:Intel 和 AMD
ARM架构:Apple M1 和 M2
链接地址: https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
Ubuntu 版本 22.04 LTS,其他系统版本通过以上链接进行访问
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
链接地址:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu-ports/
Ubuntu 版本 22.04 LTS,其他系统版本通过以上链接进行访问
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse
先安装 vim:
sudo apt-get install vim
安装完毕后输入:
# 1、进入 root 角色,获取管理员权限
sudo su
# 2、将当前的镜像源进行备份
cp /etc/apt/sources.list /etc/apt/sources.backup.list
# 3、将镜像源先进行复制,进入编辑
vi /etc/apt/sources.list
# 4、首先进入 vim 的命令模式,不要着急粘贴,也不要着急进如输入模式,长按 D 键
# 5、当前界面清空后,按 I 键进入输入模式,鼠标右键粘贴
# 6、粘贴完毕,按 ESC 键进入编辑模式,输入 “:wq” 即可
# 7、查看当前镜像源
cat /etc/apt/sources.list
# 8、更新系统
sudo apt-get update
# 9. 更新系统软件
sudo apt-get upgrade
修改镜像完毕
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。