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 (CM) 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.

Linux

You can use the following commands to install Packer in any Linux-based operating system.

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.

What's next? Let's connect to meet your IT demands.

Products Toolkits Solutions Training


Experience business-class software products, open source toolkits, technology solutions, and training, designed with cybersecurity, automation, and AI in mind.