Linux Package Indexes

Debian and Ubuntu

# gpg is required for the package signing key
sudo apt update && sudo apt install gpg

# Download the signing key to a new keyring
wget -O- https://apt.releases.hashicorp.com/gpg | \
  sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg

# Verify the key's fingerprint
gpg --no-default-keyring \
  --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint

# Add the repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com \
  $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | \
  sudo tee /etc/apt/sources.list.d/hashicorp.list

sudo apt update && sudo apt install <package>

The fingerprint must match 798A EC65 4E5C 1542 8C8E 42EE AA16 FCBC A621 E701.

RHEL, Fedora and Amazon Linux

# Add the repository for your distribution
wget -O- https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo | \
  sudo tee /etc/yum.repos.d/hashicorp.repo
wget -O- https://rpm.releases.hashicorp.com/fedora/hashicorp.repo | \
  sudo tee /etc/yum.repos.d/hashicorp.repo
wget -O- https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo | \
  sudo tee /etc/yum.repos.d/hashicorp.repo

sudo yum install <package>

The repository file resolves $releasever and $basearch, so one file covers every version and architecture below. The test channel is in it too, disabled; set enabled=1 on [hashicorp-test] for prereleases.

These instructions are reproduced from the official packaging guide: https://www.hashicorp.com/en/official-packaging-guide

Supported distributions

DistributionVersionsArchitecturesIndex
Debian and Ubuntu jammy, noble, resolute, bookworm, trixie amd64, arm, arm64, armhf, i386, ppc64el, s390x dists/ · pool/
RHEL 8, 9, 10 aarch64, arm, armv7hl, i386, ppc64le, s390x, x86_64 RHEL/
fedora 43, 44 aarch64, armv7hl, i386, s390x, x86_64 fedora/
AmazonLinux 2, latest arm, armv7hl, i386, ppc64le, s390x, x86_64 AmazonLinux/