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
更换源
三剑客
更换源
输入输出
安装VMware-Tools
SSH服务
反弹shell
-
+
首页
更换源
## kali ```bash sudo vim /etc/apt/sources.list ``` ```txt #中科大Kali镜像源 deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free non-free-firmware contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free non-free-firmware contrib ``` ```txt #阿里云Kali镜像源 deb http://mirrors.aliyun.com/kali kali-rolling main non-free non-free-firmware contrib deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free non-free-firmware contrib ``` ```txt #清华大学Kali镜像源 deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free non-free-firmware ``` ## Ubuntu 首先备份系统默认的软件源配置,后续可随时恢复: ```bash sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak ``` 阿里云源 ```txt # 阿里云 Ubuntu 24.04 LTS (noble) 源 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 # 清华大学 Ubuntu 24.04 LTS (noble) 源 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 ``` 中科大源(备用,稳定性好) ```txt # 中科大 Ubuntu 24.04 LTS (noble) 源 deb https://mirrors.ustc.edu.cn/ubuntu/ noble main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ noble main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ noble-security main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ noble-security main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ noble-updates main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ noble-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ noble-backports main restricted universe multiverse ``` ## ubuntu.source格式 ```bash test@ubuntu: cat /etc/apt/sources.list # Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources ``` ```bash sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak ``` 阿里云源: ```txt Types: deb URIs: http://mirrors.aliyun.com/ubuntu Suites: noble noble-updates noble-security noble-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg ``` 清华大学源: ```txt Types: deb URIs: https://mirrors.tuna.tsinghua.edu.cn/ubuntu Suites: noble noble-updates noble-security noble-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg ``` 中国科学技术大学源: ```txt Types: deb URIs: https://mirrors.ustc.edu.cn/ubuntu Suites: noble noble-updates noble-security noble-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg ``` ## 更新 ```bash sudo apt update -y sudo apt upgeade -y sudo apt autoremove -y sudo apt clean ``` ```txt sudo apt update -y #刷新本地软件源缓存,获取所有软件包的最新版本信息 sudo apt upgeade -y #升级系统中已安装的所有软件包到最新版本(不会自动升级系统版本,如从 24.04 到 24.10)。 sudo apt autoremove -y #自动删除 “不再被系统依赖的多余包”(通常是之前安装软件时自动安装、但后续被卸载软件的残留依赖)。 sudo apt clean #清空 /var/cache/apt/archives/ 目录下的所有下载包(.deb 文件),释放磁盘空间(这些包是之前安装 / 更新时下载的,清理后不影响已安装软件)。 ```
毛林
2025年10月17日 13:24
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
PDF文档(打印)
分享
链接
类型
密码
更新密码