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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. nsenter: command not found
  2. adduser Command Examples in Linux
  3. halt Command Examples in Linux
  4. How To Disable Or Extend System Logging Rate-limit on CentOS/RHEL 6
  5. printf: command not found
  6. whois Command Examples in Linux
  7. The /var/log/messages is empty, and so are the rotated log files such as messages.0, messages.1
  8. Linux “rm” Command Examples
  9. mke2fs: command not found
  10. getsebool: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright