温馨提示×

FetchDebian如何定制下载设置

小樊
55
2025-08-12 09:20:51
栏目: 智能运维

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

  • 配置文件:编辑 /etc/fetchdebian.conf(或 ~/.fetchdebianrc),设置镜像源、版本、组件等选项,例如:
    mirror = https://mirrors.ustc.edu.cn/debian/  # 镜像源(如中科大源)
    distribution = bullseye  # Debian版本
    components = main contrib non-free  # 组件
    architecture = amd64  # 架构
    output = /var/cache/fetchdebian  # 输出目录
    threads = 4  # 下载线程数
    
  • 命令行参数:通过参数直接指定下载选项,例如:
    fetchdebian --mirror https://mirrors.ustc.edu.cn/debian/ --distribution bullseye --components main --output /path/to/save
    
  • 代理设置:若需加速,可在 /etc/environment/etc/apt/apt.conf 中配置HTTP/HTTPS代理。

保存配置后,运行 sudo fetchdebian 即可按定制设置下载。

0