1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| cp -a /etc/apt/sources.list /etc/apt/sources.list.bak cp -a /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list.d/ubuntu.sources sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list.d/ubuntu.sources
cat > /etc/apt/sources.list.d/ubuntu.sources <<EOF Types: deb URIs: http://repo.huaweicloud.com/ubuntu/ Suites: noble noble-updates noble-backports Components: main universe restricted multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
# # Types: deb URIs: http://repo.huaweicloud.com/ubuntu/ Suites: noble-security Components: main universe restricted multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg EOF
|