• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

pacstrap: command not found

by Deepika

“pacstrap” is a script included in the Arch Linux distribution that is used to install packages to a new root directory. This script is run during the initial installation process and is used to set up the base system by installing a minimal set of packages. The “pacstrap” script can also be run later to add additional packages to the system. The script takes as its argument the path to the root directory to which packages should be installed, as well as a list of packages to install. The packages specified will be downloaded and installed, along with any dependencies they have. This makes “pacstrap” a useful tool for installing a custom Arch Linux system, for example on a disk partition or in a virtual machine.

If you encounter the below error while running the command pacstrap:

pacstrap: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install arch-install-scripts
Ubuntu apt-get install arch-install-scripts
Alpine apk add arch-install-scripts
Arch Linux pacman -S arch-install-scripts
Kali Linux apt-get install arch-install-scripts
Fedora dnf install arch-install-scripts

pacstrap Command Examples

1. Install the `base` package, Linux kernel and firmware for common hardware:

# pacstrap path/to/new/root base linux linux-firmware

2. Install the `base` package, Linux LTS kernel and `base-devel` build tools:

# pacstrap path/to/new/root base base-devel linux-lts

3. Install packages without copy the host’s mirrorlist to the target:

# pacstrap -M path/to/new/root packages

4. Use an alternate configuration file for Pacman:

# pacstrap -C path/to/pacman.conf path/to/new/root packages

5. Install packages using the package cache on the host instead of on the target:

# pacstrap -c path/to/new/root packages

6. Install packages without copy the host’s pacman keyring to the target:

# pacstrap -G path/to/new/root packages

7. Install packages in interactive mode (prompts for confirmation):

# pacstrap -i path/to/new/root packages

8. Install packages using package files:

# pacstrap -U path/to/new/root path/to/package1 path/to/package2

Filed Under: Linux

Some more articles you might also be interested in …

  1. dexter: Tool for authenticating the kubectl users with OpenId Connect
  2. lpinfo Command Examples
  3. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)
  4. rig: command not found
  5. “docker inspect” Command Examples
  6. blackfire: A command-line profiling tool for PHP (Command Examples)
  7. tail: command not found
  8. csvcut: Filter and truncate CSV files
  9. calcurse Command Examples in Linux
  10. localectl Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright