ubuntu 16.04一键换源

清华源

bash 复制代码
# 1. 备份现有源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

# 2. 写入清华源(适配你的 Ubuntu 16.04 xenial)
sudo tee /etc/apt/sources.list <<-'EOF'
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
EOF

# 3. 更新
sudo apt update

腾讯

bash 复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
sudo tee /etc/apt/sources.list <<-'EOF'
deb http://mirrors.tencentyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.tencentyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.tencentyun.com/ubuntu/ xenial-security main restricted universe multiverse
EOF
sudo apt update

华为

bash 复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
sudo tee /etc/apt/sources.list <<-'EOF'
deb http://repo.huaweicloud.com/ubuntu/ xenial main restricted universe multiverse
deb http://repo.huaweicloud.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://repo.huaweicloud.com/ubuntu/ xenial-security main restricted universe multiverse
EOF
sudo apt update

阿里

bash 复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
sudo tee /etc/apt/sources.list <<-'EOF'
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
EOF
sudo apt update
相关推荐
又来敲代码了1 小时前
k8s的部署
linux·运维·云原生·容器·kubernetes
梦·D·1 小时前
安全运维工具箱sskit_v1.0.3 部署
运维
CDN3601 小时前
DNS 负载均衡技术架构与调度策略解析
运维·架构·负载均衡
忡黑梨1 小时前
eNSP_路由策略
运维·服务器·网络·华为·智能路由器·负载均衡
IT WorryFree2 小时前
FGT-KVM 完整部署极简教程(CentOS 7 + KVM 环境)
linux·运维·centos
上海云盾安全满满2 小时前
网站被攻击了,高防CDN相比与高防服务器有什么优点
运维·服务器
一袋米扛几楼982 小时前
【报错问题】彻底解决 TypeScript 报错 TS2769: No overload matches this call (JWT 篇)
linux·javascript·typescript
@encryption2 小时前
计算机网络 --- NAT
运维·服务器·计算机网络
goyeer2 小时前
【ITIL4】32服务实践 - 服务变更管理
linux·运维·服务器·数字化·价值·itil