当前位置: 首页 > news >正文

ubuntu apt 更换阿里云源

简介:Ubuntu系统的APT(Advanced Package Tool)是一个包管理器,用于在Ubuntu上安装、卸载和更新软件包。默认情况下,APT会从Ubuntu官方源中下载软件包,但由于网络原因,有时候下载速度较慢。阿里云是国内较为常用的镜像源之一,其提供了Ubuntu官方源的镜像。

历史攻略:

docker:更换镜像源

更换Ubuntu apt阿里云源的步骤:

1、备份原有源

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

2、打开 sources.list 文件

sudo gedit /etc/apt/sources.list

3、替换为阿里云源

# 18.04deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse# 20.04deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

4、更新源

sudo apt-get update

相关文章:

  • Linux常用命令大全<二>
  • windows监控进程是否还活着,查看内存使用率
  • Copilot在Pycharm的应用和示例
  • 关于目标检测中按照比例将数据集随机划分成训练集和测试集
  • 03 详细的Git命令使用大全
  • express框架
  • 是否需要跟上鸿蒙(OpenHarmony)开发岗位热潮?
  • 定时器@Scheduled使用
  • 解决 Postman 报错问题:一份综合指南
  • 【51单片机】独立按键控制LED灯
  • 论文阅读记录SuMa SuMa++
  • Linux 部署 AI 换脸
  • 文献阅读:Sparse Low-rank Adaptation of Pre-trained Language Models
  • LeetCode240. Search a 2D Matrix II
  • 【pytorch学习】 深度学习 教程 and 实战
  • 深入了解以太坊
  • 5分钟即可掌握的前端高效利器:JavaScript 策略模式
  • bearychat的java client
  • - C#编程大幅提高OUTLOOK的邮件搜索能力!
  • input的行数自动增减
  • JavaScript HTML DOM
  • Linux gpio口使用方法
  • node 版本过低
  • php面试题 汇集2
  • Python爬虫--- 1.3 BS4库的解析器
  • ReactNative开发常用的三方模块
  • 百度小程序遇到的问题
  • 对超线程几个不同角度的解释
  • 基于Dubbo+ZooKeeper的分布式服务的实现
  • 聊聊hikari连接池的leakDetectionThreshold
  • 模型微调
  • 为视图添加丝滑的水波纹
  • 学习使用ExpressJS 4.0中的新Router
  • 用Node EJS写一个爬虫脚本每天定时给心爱的她发一封暖心邮件
  • 关于Android全面屏虚拟导航栏的适配总结
  • 新海诚画集[秒速5センチメートル:樱花抄·春]
  • !!Dom4j 学习笔记
  • #{} 和 ${}区别
  • #pragma预处理命令
  • #每日一题合集#牛客JZ23-JZ33
  • (C++17) optional的使用
  • (TipsTricks)用客户端模板精简JavaScript代码
  • (附源码)ssm经济信息门户网站 毕业设计 141634
  • (十)c52学习之旅-定时器实验
  • (四)docker:为mysql和java jar运行环境创建同一网络,容器互联
  • (译) 函数式 JS #1:简介
  • (最完美)小米手机6X的Usb调试模式在哪里打开的流程
  • *** 2003
  • ... fatal error LINK1120:1个无法解析的外部命令 的解决办法
  • .bat批处理(一):@echo off
  • .net core使用ef 6
  • .Net Remoting常用部署结构
  • .NET Standard 的管理策略
  • .NET 服务 ServiceController
  • .NET/C# 编译期能确定的字符串会在字符串暂存池中不会被 GC 垃圾回收掉