在 Debian 里,fetchdebian 并不是一个官方标准命令,常见情况有两种:
apt / apt-get 下载 .deb 包(类似 fetch)fetchdebian(用于批量下载 Debian 包)下面分别说明。
如果你只是想下载 .deb 文件而不安装,可以用:
sudo apt update
apt download 包名
例如:
apt download nginx
下载到当前目录。
如果要连同依赖一起下载:
apt-get install --download-only 包名
文件会放在:
/var/cache/apt/archives/
fetchdebian 是一个第三方脚本/工具,用于从 Debian 镜像下载指定包及其依赖。
git clone https://github.com/xxx/fetchdebian
cd fetchdebian
chmod +x fetchdebian
(具体仓库以你使用的为准)
./fetchdebian 包名
常见参数示例:
./fetchdebian -a amd64 -d bookworm nginx
含义:
-a:架构-d:Debian 版本(如 bookworm / bullseye)如果你说的 fetch Debian 是指下载 Debian ISO:
# 使用 wget
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.0.0-amd64-DVD-1.iso
| 目的 | 推荐方式 |
|---|---|
| 下载 .deb 包 | apt download |
| 下载并缓存 | apt-get install --download-only |
| 批量拉包 | fetchdebian 工具 |
| 下载系统 | 官网 ISO |
如果你能补充:
我可以给你更精确的用法。