diff --git a/Ubuntu更换中科大镜像源.md b/Ubuntu更换中科大镜像源.md new file mode 100644 index 0000000..50a5fd5 --- /dev/null +++ b/Ubuntu更换中科大镜像源.md @@ -0,0 +1,18 @@ +## Ubuntu 24.04 + +```bash +# 备份原文件(可选) +sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak +``` + +```bash +sudo sed -i 's|http://archive.ubuntu.com|http://mirrors.ustc.edu.cn|g' /etc/apt/sources.list.d/ubuntu.sources +``` + +```bash +sudo sed -i 's|http://security.ubuntu.com|http://mirrors.ustc.edu.cn|g' /etc/apt/sources.list.d/ubuntu.sources +``` + +```bash +sudo apt update +``` \ No newline at end of file