Install Terraform on Alpine Linux
Install Terraform on Alpine Linux for Docker containers and lightweight environments. Binary install, apk package, and minimal Docker images.
Terraform
Install Terraform on Arch Linux and Manjaro. Official repository, AUR packages, manual binary install, and tfenv version management.
sudo pacman -S terraform
terraform versionTerraform is in the Arch Linux community repository:
sudo pacman -Syu
sudo pacman -S terraform
terraform versionUpdate:
sudo pacman -Syu terraform# 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 latestTERRAFORM_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# 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# 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.5Same as Arch:
sudo pamac install terraform
# or
sudo pacman -S terraformArch 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.
Install Terraform on Alpine Linux for Docker containers and lightweight environments. Binary install, apk package, and minimal Docker images.
Install Terraform on RHEL 9, RHEL 8, and CentOS Stream. Official HashiCorp repository, manual binary install, and version management with tfenv.
Install Terraform on Windows Subsystem for Linux (WSL). Ubuntu, Debian, and RHEL on WSL2 with AWS CLI, VS Code integration, and path configuration.
Run Terraform in Docker containers for consistent CI/CD environments. Official HashiCorp image, custom Dockerfiles, and Docker Compose workflows.