Linux
基础知识
01搭建Centos7系统
02软件管理仓库
03Shell
04查看帮助命令
05系统工作命令
06系统状态检测命令
07工作目录切换命令
08文本文件编辑命令
09文件目录管理
10打包压缩与搜索命令
11输入输出重定向
12管道符与通配符
13Vim编辑器
14Shell脚本
15shell流程控制语句
16用户管理操作
17文件权限与归属
18文件隐藏属性
19文件访问控制列表
20su与sudo
21存储结构
22物理设备命名规则
23文件系统
24挂载硬件设备
25虚拟机添加硬盘设备
26系统中操作添加硬盘设备
27添加交换分区
28磁盘容器配额
29软硬方式链接
30RAID
31LVM
32程序安装与管理
33计划任务
34日志文件分析
35测试网络联通性
36FTP服务
37操作系统基本符号
38操作系统三剑客
39shell基础
40shell语法
41DNS
42Apache概述
43Nginx概述
44集群概述
Vmware安装Ubuntu
更换源
-
+
首页
更换源
更换系统源(如 Ubuntu 的apt源、CentOS 的yum/dnf源)的核心目的是解决官方源在国内使用时的 “访问慢、不稳定、甚至无法使用” 问题,本质是通过切换到国内镜像源,优化软件下载、更新的体验和可靠性。 ## Ubuntu 以Ubuntu 24.04为例 。 首先备份系统默认的源列表,以防出现问题时可以恢复: ```bash cp /etc/apt/sources.list /etc/apt/sources.list.bak ``` **编辑源列表文件**: ```bash vi /etc/apt/sources.list ``` **替换为国内源** 将文件中的内容替换为国内源,以下是几个常用的国内源: **阿里云源**: ```txt deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse ``` **清华大学源**: ```txt deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-security main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-security main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse ``` **保存并退出**: 【esc】+ wq **更新源**: ```txt apt update ``` **升级软件包**: ```bash apt upgrade ```
毛林
2025年9月12日 21:34
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
PDF文档(打印)
分享
链接
类型
密码
更新密码