← 返回命令列表

Linux command

debootstrap 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo debootstrap stable [path/to/debian-root]/ http://deb.debian.org/debian

Example

sudo debootstrap --variant=minbase stable [path/to/debian-root]/

Example

sudo debootstrap sid [path/to/sid-root]/ file:///[path/to/mirror]/

Example

sudo chroot [path/to/root]

List

ls /usr/share/debootstrap/scripts/

说明

debootstrap installs a basic Debian system into a subdirectory. It downloads packages from a mirror and installs them to create a minimal working system that can be used for chroot environments, containers, or new installations. The resulting system is minimal but functional, suitable for further customization.

参数

--variant _variant_
minbase (minimal), buildd (build dependencies), fakechroot
--arch _arch_
Target architecture (amd64, i386, arm64, etc.)
--include _packages_
Additional packages to install
--exclude _packages_
Packages to exclude
--foreign
First stage only (for cross-architecture)

FAQ

What is the debootstrap command used for?

debootstrap installs a basic Debian system into a subdirectory. It downloads packages from a mirror and installs them to create a minimal working system that can be used for chroot environments, containers, or new installations. The resulting system is minimal but functional, suitable for further customization.

How do I run a basic debootstrap example?

Run `sudo debootstrap stable [path/to/debian-root]/ http://deb.debian.org/debian` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --variant _variant_ do in debootstrap?

minbase (minimal), buildd (build dependencies), fakechroot