惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
B
Blog
腾讯CDC
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
L
LangChain Blog
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog

博客园 - LiuYanYGZ

grep -C 5 ====> 显示匹配行,前、后各5行 tail -F 比 fail -f 强大 2025.04.15交通事故记录(沈阳、爸爸) 10KG、2KG盘称 摩托车贝纳利302S换机油 excel身份证号验证 在本机A中执行expect脚本:ssh到B,在B机器上从A机器scp文件到B 妈妈的药:血府逐瘀丸、天麻钩藤颗粒、半夏白术天麻汤、杞菊地黄丸、当归补血汤、糠酸莫米松凝胶、尿素维E乳膏 桂附地黄丸、舒筋活血片 辽宁省沈阳市居住证办理2026.01.21 北京健康证(立水桥地铁站附近)第二次去2025.12.28 鼻窦炎、鼻炎、花粉过敏 70迈M800后摄像头改装 D07线 京B摩托车第6年年检,《京顺机动车检测场》150元不用预约 source insight4菜单工具按钮变乱恢复 探索Go语言性能优化:全面解析pprof工具 检查一个IP地址是否在一个网段中 __attribute__((visibility(“default“)))含义 ls | tee 1.txt 如何拿到ls的返回值$? 使用golang访问linux telnet服务器 手机CPU性能天梯图 Poedit Pro国际化翻译编辑器 Proe和Creo的区别 Ubuntu修改DNS方法(临时和永久修改DNS) Ghidra(反汇编工具)
Ubuntu中apt设置国内源(以阿里云为例)
LiuYanYGZ · 2025-03-24 · via 博客园 - LiuYanYGZ

摘自:https://zhuanlan.zhihu.com/p/7107285821

在 Ubuntu 系统中,将 APT 源设置为阿里云源可以提高软件包更新和下载速度。

设置国内源

1. 备份现有的源列表:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2. 编辑 sources.list 文件:

使用以下命令打开 sources.list 文件:

sudo vi /etc/apt/sources.list

3. 替换内容为阿里源:

根据Ubuntu 版本,将内容替换为对应的阿里源。以下是常见版本的源地址:

Ubuntu 22.04 (Jammy):

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

Ubuntu 20.04 (Focal):

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

Ubuntu 18.04 (Bionic):

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

编辑完成后,保存并退出:

4. 更新软件包索引:

使用以下命令更新软件包索引:

sudo apt update

查找各种版本的包

可以在 https://launchpad.net/ubuntu/ 上查找对应版本的代码和二进制

posted @ 2025-03-24 14:49  LiuYanYGZ  阅读(9152)  评论()    收藏  举报