温馨提示×

Debian中fetchdebian的命令行参数有哪些

小樊
41
2025-12-17 05:52:38
栏目: 智能运维

fetchdebian 是一个用于从 Debian 存储库下载软件包的工具。它允许用户获取 Debian 存储库中的软件包元数据和实际软件包文件。以下是一些常用的 fetchdebian 命令行参数:

基本参数

  • -d, --distribution <dist>: 指定要下载的 Debian 发行版版本。
  • -c, --component <comp>: 指定要下载的组件(如 main, contrib, non-free)。
  • -a, --architecture <arch>: 指定要下载的架构(如 amd64, arm64)。
  • -o, --output <dir>: 指定输出目录,用于存放下载的文件。
  • -v, --verbose: 启用详细模式,显示更多下载过程中的信息。

高级参数

  • --mirror-only: 仅下载镜像列表,不实际下载软件包。
  • --no-check-gpg: 跳过 GPG 签名验证。
  • --no-check-debian-archive: 跳过 Debian 存储库的完整性检查。
  • --no-cache: 不缓存下载的文件,每次都从源获取。
  • --quiet: 减少输出信息,使界面更简洁。
  • --help: 显示帮助信息。
  • --version: 显示 fetchdebian 的版本信息。

示例用法

# 下载 Debian 11 (Bullseye) 的 main 组件的所有软件包到当前目录
fetchdebian -d bullseye -c main -a amd64

# 下载特定软件包到指定目录
fetchdebian -d bullseye -c main -a amd64 package_name -o /path/to/output

# 仅下载镜像列表
fetchdebian -d bullseye -c main -a amd64 --mirror-only

请注意,fetchdebian 的参数可能会随着版本的更新而发生变化。在使用前,建议查阅最新的官方文档或使用 fetchdebian --help 查看当前版本的参数列表。

0