代码拉取完成,页面将自动刷新
#!/bin/bash
cp /etc/apt/sources.list /etc/apt/sources.list.bak
ubuntu_release=`lsb_release -c | awk -F: '{print $2}' | egrep -o '[a-z]{1,}'`
update_url = "http://mirrors.aliyun.com/ubuntu/"
cat << EOF | tee /etc/apt/sources.list
deb ${update_url} ${ubuntu_release} main restricted universe multiverse
deb ${update_url} ${ubuntu_release}-security main restricted universe multiverse
deb ${update_url} ${ubuntu_release}-updates main restricted universe multiverse
deb ${update_url} ${ubuntu_release}-proposed main restricted universe multiverse
deb ${update_url} ${ubuntu_release}-backports main restricted universe multiverse
deb-src ${update_url} ${ubuntu_release} main restricted universe multiverse
deb-src ${update_url} ${ubuntu_release}-security main restricted universe multiverse
deb-src ${update_url} ${ubuntu_release}-updates main restricted universe multiverse
deb-src ${update_url} ${ubuntu_release}-proposed main restricted universe multiverse
deb-src ${update_url} ${ubuntu_release}-backports main restricted universe multiverse
EOF
apt clean && apt update && apt dist-upgrade --fix-missing
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。