phxc8 发表于 2024-9-4 09:11:04

ubuntu20/22/23/24.04换国内中科大源

Ubuntu 20.04 LTS (Focal Fossa)
sed -i '1,$d' /etc/apt/sources.list && tee -a /etc/apt/sources.list > /dev/null <<EOL
deb http://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
EOL
apt-get update --allow-releaseinfo-change

Ubuntu 22.04 LTS (Jammy Jellyfish)
sed -i '1,$d' /etc/apt/sources.list && tee -a /etc/apt/sources.list > /dev/null <<EOL
deb http://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
EOL
apt-get update --allow-releaseinfo-change

Ubuntu 23.04 (Lunar Lobster)
sed -i '1,$d' /etc/apt/sources.list && tee -a /etc/apt/sources.list > /dev/null <<EOL
deb http://mirrors.ustc.edu.cn/ubuntu/ lunar main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ lunar-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ lunar-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ lunar-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ lunar main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ lunar-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ lunar-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ lunar-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse
EOL
apt-get update --allow-releaseinfo-change

Ubuntu 24.04 (noble)
sed -i '1,$d' /etc/apt/sources.list && tee -a /etc/apt/sources.list > /dev/null <<EOL
deb https://mirrors.ustc.edu.cn/ubuntu/ noble main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ noble main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ noble-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ noble-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
EOL
apt-get update --allow-releaseinfo-change
页: [1]
查看完整版本: ubuntu20/22/23/24.04换国内中科大源