How to install Packer on Linux?

First published: Monday, October 14, 2024 | Last updated: Monday, October 14, 2024

Learn the exact process to install Packer on your Linux operating system to create machine images for various infrastructures.


What is Packer?

Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel. Packer does not replace configuration management like Chef or Puppet. In fact, when building images, Packer is able to use tools like Chef or Puppet to install software onto the image.

Install Packer

To install Packer on a Linux-based operating system, the most recommended method is to download and extract the executable binary. This approach is considered best practice, regardless of the specific Linux distribution you are using. After installation, it is important to verify the Packer version to ensure that it has been correctly installed. Remember, Packer is simply an executable binary, so confirming the installation’s success by checking the installed version is essential. For a detailed and comprehensive guide, we recommend referring to the official Packer documentation.

AMD64 / X86-64 / X64

# Download Packer.
$ wget https://releases.hashicorp.com/packer/1.7.3/packer_1.7.3_linux_amd64.zip -P /tmp

# Extract Packer from archive.
$ unzip /tmp/packer_1.7.3_linux_amd64.zip -d /tmp

# Install Packer.
$ sudo mv /tmp/packer /usr/local/bin

# Check Packer version.
$ packer --version

ARM64

# Download Packer.
$ wget https://releases.hashicorp.com/packer/1.7.3/packer_1.7.3_linux_arm64.zip -P /tmp

# Extract Packer from archive.
$ unzip /tmp/packer_1.7.3_linux_arm64.zip -d /tmp

# Install Packer.
$ sudo mv /tmp/packer /usr/local/bin

# Check Packer version.
$ packer --version

Logo of SloopStash organization.

Interested in our products, open source works, training, or solutions?

Just send us a message, we're here to support you. Feel free to reach out anytime for assistance.


Contact us