Linux command
mmdebstrap 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Example
sudo mmdebstrap stable [path/to/debian-root]/
Example
mmdebstrap bookworm [path/to/debian-bookworm.tar] [http://mirror.example.org/debian]
Example
mmdebstrap sid [path/to/debian-sid.tar] --include=[pkg1,pkg2]
Example
mmdebstrap --mode=unshare stable [path/to/debian.tar]
Example
mmdebstrap --variant=essential stable [path/to/minimal.tar]
Simulate
mmdebstrap --simulate stable
说明
mmdebstrap creates Debian chroots from one or more mirrors. It is an alternative to debootstrap that uses apt for dependency resolution, supports multiple mirrors simultaneously, and can operate without root privileges using user namespaces. The suite can be a codename (bookworm, sid) or symbolic name (stable, unstable). The target can be a directory, tarball, squashfs image, ext2/ext4 image, or stdout. Output format is auto-detected from file extension.
参数
- --mode _name_
- Operation mode: auto, sudo, root, unshare, fakeroot, fakechroot, proot, chrootless
- --format _name_
- Output format: auto, directory, tar, squashfs, ext2, null
- --variant _name_
- Package set: extract, custom, essential, apt, required, minbase, buildd, important, debootstrap, -, standard
- --include _packages_
- Additional packages to install (comma-separated)
- --components _list_
- Repository components: main, contrib, non-free, non-free-firmware
- --architectures _list_
- Supported architectures (native and foreign)
- --keyring _file_
- GPG keyring for signature verification
- --aptopt _option_
- Pass options to apt
- --dpkgopt _option_
- Pass options to dpkg
- --setup-hook _cmd_
- Command to run after initial setup
- --customize-hook _cmd_
- Command to run after packages installed
- --hook-directory _dir_
- Execute hook scripts from directory
- --simulate, --dry-run
- Test without downloading or installing
- -q, --quiet
- Suppress output
- -v, --verbose
- Show detailed output
FAQ
What is the mmdebstrap command used for?
mmdebstrap creates Debian chroots from one or more mirrors. It is an alternative to debootstrap that uses apt for dependency resolution, supports multiple mirrors simultaneously, and can operate without root privileges using user namespaces. The suite can be a codename (bookworm, sid) or symbolic name (stable, unstable). The target can be a directory, tarball, squashfs image, ext2/ext4 image, or stdout. Output format is auto-detected from file extension.
How do I run a basic mmdebstrap example?
Run `sudo mmdebstrap stable [path/to/debian-root]/` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --mode _name_ do in mmdebstrap?
Operation mode: auto, sudo, root, unshare, fakeroot, fakechroot, proot, chrootless