TerraformPilot

Terraform

Install Terraform on Arch Linux

Install Terraform on Arch Linux and Manjaro. Official repository, AUR packages, manual binary install, and tfenv version management.

LLuca Berton1 min read

Quick Answer

#
sudo pacman -S terraform
terraform version
#

Terraform is in the Arch Linux community repository:

sudo pacman -Syu
sudo pacman -S terraform
terraform version

Update:

sudo pacman -Syu terraform

Method 2: AUR (tfenv)

#
# Using yay
yay -S tfenv
 
# Or using paru
paru -S tfenv
 
# Install and use a specific version
tfenv install 1.8.5
tfenv use 1.8.5
terraform version
 
# Install latest
tfenv install latest
tfenv use latest

Method 3: Manual Binary

#
TERRAFORM_VERSION="1.8.5"
curl -LO "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip"
unzip "terraform_${TERRAFORM_VERSION}_linux_amd64.zip"
sudo mv terraform /usr/local/bin/
rm "terraform_${TERRAFORM_VERSION}_linux_amd64.zip"
terraform version

Enable Tab Completion

#
# Bash
terraform -install-autocomplete
source ~/.bashrc
 
# Zsh
terraform -install-autocomplete
source ~/.zshrc
 
# Fish (manual)
complete -c terraform -f -a "(terraform | string match -r '^\w+')"
#
# All from official repos or AUR
sudo pacman -S terraform-ls   # Language server for IDEs
 
# AUR packages
yay -S tflint                 # Linter
yay -S terraform-docs         # Documentation generator
yay -S tfsec                  # Security scanner
yay -S terragrunt             # Terraform wrapper

Uninstall

#
# If installed via pacman
sudo pacman -Rs terraform
 
# If installed manually
sudo rm /usr/local/bin/terraform
 
# If installed via tfenv
tfenv uninstall 1.8.5

Manjaro

#

Same as Arch:

sudo pamac install terraform
# or
sudo pacman -S terraform
#

Conclusion

#

Arch Linux has Terraform in the official community repo — pacman -S terraform is the simplest install. Use tfenv from AUR when you need multiple versions. Arch typically has the latest Terraform version within days of release.

#Terraform#Arch Linux#Linux#Install

Share this article