debootstrap
Quick Reference
Command Name:
debootstrap
Category:
system
Platform:
linux
Basic Usage:
Common Use Cases
- 1
Chroot environment creation
Create a basic Debian/Ubuntu system in a subdirectory
- 2
Container setup
Prepare base filesystem for containers or virtual machines
- 3
Cross-distribution development
Set up development environments for different Debian versions
- 4
System recovery
Create a minimal system for recovering damaged installations
Syntax
debootstrap [options] suite target [mirror [script]]
Options
Option | Description |
---|---|
--arch=ARCH | Set the target architecture (e.g., amd64, arm64, i386) |
--components=COMPONENTS | Comma-separated list of components to use (e.g., main,contrib,non-free) |
--debian-installer | Set up for use by the Debian Installer |
--exclude=PACKAGES | Comma-separated list of packages to exclude |
--foreign | Do the installation for first stage only (for cross-architecture installs) |
--include=PACKAGES | Comma-separated list of packages to include |
--keyring=FILE | Use FILE as the keyring for package verification |
--merged-usr | Use a merged-/usr system setup |
--no-check-gpg | Skip GPG verification of Release files |
--no-merged-usr | Avoid using a merged-/usr system setup |
--print-debs | Print the packages to be installed |
--second-stage | Run second stage of the installation (after --foreign) |
--variant=VARIANT | Set installation variant (minbase, buildd, fakechroot, etc.) |
--verbose | Verbose output |
Examples
How to Use These Examples
The examples below show common ways to use the debootstrap
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
# Install a minimal Debian stable system in /mnt/debian sudo debootstrap stable /mnt/debian http://deb.debian.org/debian/
Advanced Examples:
# Install Debian unstable with components sudo debootstrap --components=main,contrib,non-free unstable /mnt/debian-unstable