$linuxjunkies
>

pacstrap

A command-line utility that installs packages into a target directory, typically used during Arch Linux installation to bootstrap a new system with essential packages.

pacstrap is a wrapper script around pacman (Arch's package manager) that installs packages into a specified root directory rather than the running system. It's essential during the Arch installation process when you boot from the live ISO and need to install packages into your target filesystem before chrooting into it.

The command syntax is pacstrap [options] root package1 package2 .... For example, pacstrap /mnt base linux linux-firmware installs the base system, Linux kernel, and firmware files into the /mnt directory, which will become your actual system root after installation completes.

pacstrap handles dependency resolution and downloads packages from your configured repositories. It's particularly useful because it allows package installation into a target filesystem that isn't the current root, making it ideal for initial system setup before the system is bootable.

Related terms