温馨提示×

FetchDebian如何定制个性化设置

小樊
42
2025-09-09 12:24:37
栏目: 智能运维

FetchDebian可通过配置文件和命令行参数定制个性化设置,具体如下:

  • 配置文件:编辑 /etc/fetchdebian.conf,可设置镜像源(mirror)、Debian版本(distribution)、组件(components)、架构(architecture)、输出目录(output)等,例如:
    mirror = "https://mirrors.ustc.edu.cn/debian/"  # 使用中科大镜像
    distribution = "bullseye"
    components = "main contrib"
    architecture = "amd64"
    output = "/opt/fetchdebian"  # 自定义输出路径
    
  • 命令行参数:通过参数直接指定临时设置,如:
    • --mirror:覆盖配置文件中的镜像源,如 --mirror=https://deb.debian.org/debian/
    • --component:指定下载组件,如 --component=main,non-free
    • --output:临时指定输出路径,如 --output=/tmp/debian
    • --threads:设置多线程下载数,如 --threads=4

保存配置后,运行 sudo fetchdebian 即可生效。

0