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
相关推荐
keyipatience37 分钟前
线程栈与TLS和线程互斥
java·linux·服务器·开发语言·ubuntu
元Y亨H41 分钟前
生产环境监控与故障应急处理(5-5-5 标准)指南
运维
j7~1 小时前
【Linux】二十二.《Linux 信号机制完全指南:表示、捕捉与处理》
linux·信号处理·volatile·可入重函数·保存信号
观山岳五楼2 小时前
Ubuntu 24 怎么使用Ubuntu 20 的镜像源
linux·运维·ubuntu
m0_715646762 小时前
20260720
linux·arm
寒晓星3 小时前
[linux]线程及多线程
linux·运维
辰痕~3 小时前
物理机装Linux操作系统(Ubuntu为例)
linux·ubuntu
慧一居士3 小时前
Linux如何设置固定的静态ip
运维
国服第二切图仔4 小时前
13其他工具 - Skill/LSP/Sleep等
linux·运维·里氏替换原则
就不掉头发5 小时前
计算机的虚拟内存
linux·服务器·windows