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 小时前
风电光缆运维提质增效:G-4000A 光缆故障追踪仪破解风场巡检难题
运维·网络·数据库
三十..2 小时前
MySQL 从入门到高可用架构实战精要
运维·数据库·mysql
跨境数据猎手2 小时前
大数据在电商行业的应用
大数据·运维·爬虫
linyanRPA3 小时前
影刀RPA店群自动化实战:多店铺活动自动报名与促销管理架构设计
运维·自动化·办公自动化·rpa·python脚本·爬虫自动化·店群自动化
mounter6253 小时前
现代 Linux 内存管理的演进与变革:从传统 LRU 到多代架构 MGLRU
linux·服务器·kernel
会Tk矩阵群控的小木3 小时前
安卓群控系统对于游戏工作室实战教程
android·运维·游戏·adb·开源软件·个人开发
赵渝强老师4 小时前
【赵渝强老师】Kubernetes(K8s)中的金丝雀升级
linux·docker·云原生·容器·kubernetes
佛山个人技术开发4 小时前
GitCode SSH连接配置教程
运维·ssh·gitcode
Qt程序员4 小时前
Linux RCU 原理与应用
linux·c++·内核·linux内核·rcu
The Sheep 20234 小时前
Vue复习
linux·服务器·数据库