How to Install Terraform
Pre-installation Preparation
Linux System Installation
Ubuntu/Debian System
sudo apt-get update sudo apt-get install -y gnupg software-properties-common curlwget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpgecho "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.listsudo apt update sudo apt install terraform
CentOS/RHEL System
Windows System Installation
Method 1: Using Chocolatey Package Manager (Recommended)
Method 2: Manual Installation
MacOS System Installation
Method 1: Using Homebrew (Recommended)
Method 2: Manual Installation
Verify Installation
Post-installation Configuration
1. Configure Command Line Auto-completion (Optional)
2. Verify Installation Environment
Reference Information
Last updated